Class: IndexedFormula

store~IndexedFormula(features)

Indexed Formula aka Store

Constructor

new IndexedFormula(features)

Parameters:
Name Type Description
features Array.<String> What sort of autmatic processing to do? Array of string
Properties
Name Type Description
sameAs Boolean Smush together A and B nodes whenever { A sameAs B }
Source:

Members

length

Returns the number of statements contained in this IndexedFormula. (Getter proxy to this.statements). Usage: ``` var kb = rdf.graph() kb.length // -> 0 ```
Source:

Methods

add(subject, predicate, object, why) → {Statement}

Adds a triple (quad) to the store.
Parameters:
Name Type Description
subject Term The thing about which the fact a relationship is asserted
predicate namedNode The relationship which is asserted
object Term The object of the relationship, e.g. another thing or avalue
why namedNode The document in which the triple (S,P,O) was or will be stored on the web
Source:
Returns:
The statement added to the store
Type
Statement

allAliases()

Return all equivalent URIs by which this is known
Source:

canon()

Returns the symbol with canonical URI as smushed
Source:

checkStatementList()

Self-consistency checking for diagnostis only Is each statement properly indexed?
Source:

equate()

simplify graph in store when we realize two identifiers are equivalent We replace the bigger with the smaller.
Source:

mentionsURI()

Find out whether a given URI is used as symbol in the formula
Source:

nextSymbol()

Find an unused id for a file being edited: return a symbol (Note: Slow iff a lot of them -- could be O(log(k)) )
Source:

querySync(myQuery) → {Array.<Bindings>}

Query this store synchhronously and return bindings
Parameters:
Name Type Description
myQuery Query the query object
Source:
Returns:
Type
Array.<Bindings>

remove()

Finds a statement object and removes it
Source:

removeDocument()

Removes all statemnts in a doc
Source:

removeMany()

remove all statements matching args (within limit) *
Source:

removeStatement()

Remove a particular statement object from the store st a statement which is already in the store and indexed. Make sure you only use this for these. Otherwise, you should use remove() above.
Source:

replaceWith()

Replace big with small, obsoleted with obsoleting.
Source:

sameThings()

Compare by canonical URI as smushed
Source:

statementsMatching(subject, predicate, object, graph, justOne) → {Array.<Node>}

Search the Store ALL CONVENIENCE LOOKUP FUNCTIONS RELY ON THIS!
Parameters:
Name Type Description
subject Node A node to search for as subject, or if null, a wildcard
predicate Node A node to search for as predicate, or if null, a wildcard
object Node A node to search for as object, or if null, a wildcard
graph Node A node to search for as graph, or if null, a wildcard
justOne Boolean flag - stop when found one rather than get all of them?
Source:
Returns:
- An array of nodes which match the wildcard position
Type
Array.<Node>

uris()

A list of all the URIs by which this thing is known
Source: