Client-side RDF store. (see RDF Browser )
Creates the object. Argument callback is executed
every time store's contents change. Available options
(properties of options object) are:
All loaded data in a big array of triples (array of
arrays).
All loaded data in a complex JSON object, as shown in the
Example.
Loaded data after filters have been applied. Same structure as
data.all .
Dereferences url and adds its contents to store.
onstart and onend arguments are used to
override global ajaxStart and ajaxEnd
parameters, respectively.
Adds an array of triples (triplesArray) to storage. The
url specifies the address where these triples
originate.
Adds an XML document ( xmlDoc , fetched by
OAT.AJAX.GET for instance) to storage. The
url specifies the address where this document
originates.
Returns a reasonable title (falls back to URI) of an item in
storage.
Simplifies an URI by removing as much as possible (leaving the
part after '#' or '/').
Applies a pass filter to store contents. Filter type is
specified as one of available constants.
For FILTER_PROPERTY , both 2nd and 3rd arguments
should be used: these specify predicate value and
object value (only resources having this P and O will
pass).
For FILTER_URI , only 2nd argument should be used: this value specifies an URI to be filtered (only resources having this URI as O or S will pass).
Removes a previously set filter; syntax is the same as in
addFilter .
Temporarily disables (removes) all triples originating from
URL from the store. URL must be dereferenced.
Re-enables previously disabled URL , so its contents
are loaded in a store. URL must be dereferenced.
[ { preds:{ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type":[ "http://www.w3.org/2000/10/swap/pim/contact#Male", "http://xmlns.com/foaf/0.1/Person" ], "http://www.w3.org/2000/01/rdf-schema#label":["Tim Berners-Lee"], "http://www.w3.org/2000/10/swap/pim/contact#assistant":[{...}], "http://www.w3.org/2000/10/swap/pim/contact#homePage":["./"], "http://www.w3.org/2000/10/swap/pim/contact#office":[{...}] }, ouri:"samples/tbl.xml", type:"http://xmlns.com/foaf/0.1/PersonalProfileDocument", uri:"_:832_0", back:[{...}] }, ... ]
var callback = function() { alert("Store contents have changed, check them out!"); } var store = new OAT.RDFStore(callback, {}); store.addURL("myRDF.n3");