src/app-registry.js
/**
 * Returns a list of registry entries from a given parsed type index graph.
 * @method registrationsFromGraph
 * @param graph {Graph} Parsed type index graph
 * @param type {NamedNode} RDF Class
 * @param rdf {RDF} RDF Library
 * @return {Array<AppRegistration>}
 */
Returns a list of registry entries from a given parsed type index graph.
Returns a list of registry entries from a given parsed type index graph .
function registrationsFromGraph (graph, type, rdf) {
  var entrySubject
  var ns = vocab(rdf)
  var registrations = []
  if (!graph) {
    return registrations
  }
  graph.statementsMatching(null, ns.app('commonType'), type)
    .forEach(function (entry) {
      entrySubject = entry.subject
      var app = new AppRegistration()
      app.initFromGraph(entrySubject, graph, rdf)
      registrations.push(app)
    })
  return registrations
}
function registrationsFromGraph ( graph , type , rdf ) { var entrySubject var ns = vocab ( rdf ) var registrations = [ ] if ( ! graph ) { return registrations } graph . statementsMatching ( null , ns . app ( 'commonType' ) , type ) . forEach ( function ( entry ) { entrySubject = entry . subject var app = new AppRegistration ( ) app . initFromGraph ( entrySubject , graph , rdf ) registrations . push ( app ) } ) return registrations }
Returns a list of registry entries from a given parsed type index graph.
Returns a list of registry entries from a given parsed type index graph .