Module: util

Utility functions for $rdf
Source:

Methods

(static) AJAR_handleNewTerm()

Loads ontologies of the data we load (this is the callback from the kb to the fetcher).
Source:

(static) arrayToStatements(rdfFactory, subject, data) → {Array.<Statement>}

Expands an array of Terms to a set of statements representing the rdf:list.
Parameters:
Name Type Description
rdfFactory The factory to use
subject NamedNode | BlankNode The iri of the first list item.
data Array.<Term> The terms to expand into the list.
Source:
Returns:
- The {data} as a set of statements.
Type
Array.<Statement>

(static) DOMParserFactory()

Returns a DOM parser based on current runtime environment.
Source:

(static) heavyCompare()

Compares statements (heavy comparison for repeatable canonical ordering)
Source:

(static) parseXML()

Returns a DOM from parsex XML.
Source:

(static) RDFArrayRemove()

Removes all statements equal to x from a
Source:

(inner) callbackify(obj, callbacks)

Adds callback functionality to an object. Callback functions are indexed by a 'hook' string. They return true if they want to be called again.
Parameters:
Name Type Description
obj Object
callbacks Array.<function()>
Source:

(inner) output(o)

Defines a simple debugging function
Parameters:
Name Type Description
o String
Source:

(inner) stringTemplate()

C++, python style %s -> subs
Source: