Class Index | File Index

Classes


Class jQuery.rdf.databank

Represents a triplestore, holding a bunch of jQuery.rdf.triples.
Defined in: jquery.rdf.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
jQuery.rdf.databank(triples, options)
Creates a new jQuery.rdf.databank object.
Method Summary
Method Attributes Method Name and Description
 
add(triple, options)
Adds a triple to the jQuery.rdf.databank or another jQuery.rdf.databank object to create a union.
 
base(base)
Sets or returns the base URI of the jQuery.rdf.databank.
 
describe(resources)
Provides simple concise bounded descriptions of the resources that are passed in the argument.
 
dump(options)
Dumps the triples in the databank into a format that can be shown to the user or sent to a server.
 
except(data)
Creates a new databank containing all the triples in this jQuery.rdf.databank except those in the jQuery.rdf.databank passed as the argument.
 
load(data)
Loads some data into the databank.
 
prefix(prefix, namespace)
Sets or returns a namespace binding on the jQuery.rdf.databank.
 
reason(rules, options)
Reasons over this databank using the jQuery.rdf.rule or jQuery.rdf.ruleset given as the first argument.
 
remove(triple, options)
Removes a triple from the jQuery.rdf.databank.
 
size()
Tells you how many triples the databank contains.
 
Provides a string representation of the databank which simply specifies how many triples it contains.
 
Provides a jQuery object containing the triples held in this jQuery.rdf.databank.
Class Detail
jQuery.rdf.databank(triples, options)

Creates a new jQuery.rdf.databank object. This should be invoked as a method rather than constructed using new; indeed you will not usually want to generate these objects directly, but manipulate them through a jQuery.rdf object.

Parameters:
{(String|jQuery.rdf.triple)[]} triples Optional, Default: []
An array of triples to store in the databank.
{Object} options Optional
Initialisation of the databank.
{Object} options.namespaces Optional
An object representing a set of namespace bindings used when interpreting the CURIEs in strings representing triples. Rather than passing this in when you construct the jQuery.rdf.databank instance, you will usually want to use the jQuery.rdf.databank#prefix method.
{String|jQuery.uri} options.base Optional
The base URI used to interpret any relative URIs used within the strings representing triples.
Returns:
{jQuery.rdf.databank} The newly-created databank.
See:
jQuery.rdf
Method Detail
{jQuery.rdf.databank} add(triple, options)
Adds a triple to the jQuery.rdf.databank or another jQuery.rdf.databank object to create a union.
Parameters:
{String|jQuery.rdf.triple|jQuery.rdf.databank} triple
The triple or jQuery.rdf.databank object to be added to this one. If the triple is a jQuery.rdf.databank object, the two databanks are unioned together. If the triple is a string, it's parsed as a jQuery.rdf.triple.
{Object} options Optional
{Object} options.namespaces Optional
An object representing a set of namespace bindings used to interpret CURIEs within the triple. Defaults to the namespace bindings defined on the jQuery.rdf.databank.
{String|jQuery.uri} options.base Optional
The base URI used to interpret any relative URIs used within the triple. Defaults to the base URI defined on the jQuery.rdf.databank.
Returns:
{jQuery.rdf.databank} This jQuery.rdf.databank object.
See:
jQuery.rdf#add

base(base)
Sets or returns the base URI of the jQuery.rdf.databank.
Parameters:
{String|jQuery.uri} base Optional
Returns:
A jQuery.uri if no base URI is specified, otherwise returns this jQuery.rdf.databank object.
See:
jQuery.rdf#base

{jQuery} describe(resources)
Provides simple concise bounded descriptions of the resources that are passed in the argument. This mirrors the DESCRIBE form in SPARQL.
Parameters:
{(String|jQuery.rdf.resource)[]} resources
An array that can contain strings, jQuery.rdf.resources or a mixture of the two.
Returns:
{jQuery} A jQuery object holding the jQuery.rdf.triples that describe the listed resources.
See:
jQuery.rdf#describe

{Object|Node|String} dump(options)
Dumps the triples in the databank into a format that can be shown to the user or sent to a server.
Parameters:
{Object} options Optional
Options that control the formatting of the triples. See jQuery.rdf.dump for details.
Returns:
{Object|Node|String}
See:
jQuery.rdf.dump

{jQuery.rdf.databank} except(data)
Creates a new databank containing all the triples in this jQuery.rdf.databank except those in the jQuery.rdf.databank passed as the argument.
var old = $('html').rdf().databank;
...some processing occurs...
var new = $('html').rdf().databank;
var added = new.except(old);
var removed = old.except(new);
Parameters:
{jQuery.rdf.databank} data
The other jQuery.rdf.databank
Returns:
{jQuery.rdf.databank} A new jQuery.rdf.databank containing the triples in this jQuery.rdf.databank except for those in the data parameter.

{jQuery.rdf.databank} load(data)
Loads some data into the databank.
Parameters:
{Node|Object} data
If the data is a node, it's interpreted to be an RDF/XML syntax document and will be parsed as such. Otherwise, it's taken to be a RDF/JSON object. The data cannot be a string; it must be parsed before it is passed to this function.
Returns:
{jQuery.rdf.databank} The jQuery.rdf.databank itself.
See:
jQuery.rdf#load

{Object|jQuery.uri|jQuery.rdf} prefix(prefix, namespace)
Sets or returns a namespace binding on the jQuery.rdf.databank.
Parameters:
{String} prefix Optional
{String} namespace Optional
Returns:
{Object|jQuery.uri|jQuery.rdf} If no prefix or namespace is specified, returns an object providing all namespace bindings on the jQuery.rdf#databank. If a prefix is specified without a namespace, returns the jQuery.uri associated with that prefix. Otherwise returns this jQuery.rdf object after setting the namespace binding.
See:
jQuery.rdf#prefix

{jQuery.rdf.databank} reason(rules, options)
Reasons over this databank using the jQuery.rdf.rule or jQuery.rdf.ruleset given as the first argument.
Defined in: jquery.rules.js.
Parameters:
{jQuery.rdf.rule|jQuery.rdf.ruleset} rules
The rules to run over the databank.
{Object} options Optional
{Integer} options.limit Optional, Default: 50
The rules in this ruleset are generally run over the jQuery.rdf.databank until it stops growing. In some situations, notably when creating blank nodes, this can lead to an infinite loop. The limit option indicates the maximum number of times the ruleset will be run before halting.
Returns:
{jQuery.rdf.databank} The original jQuery.rdf.databank, although it may now contain more triples.
See:
jQuery.rdf.ruleset#run
jQuery.rdf.rule#run

{jQuery.rdf.databank} remove(triple, options)
Removes a triple from the jQuery.rdf.databank.
Parameters:
{String|jQuery.rdf.triple} triple
The triple to be removed.
{Object} options Optional
{Object} options.namespaces Optional
An object representing a set of namespace bindings used to interpret any CURIEs within the triple. Defaults to the namespace bindings defined on the jQuery.rdf.databank.
{String|jQuery.uri} options.base Optional
The base URI used to interpret any relative URIs used within the triple. Defaults to the base URI defined on the jQuery.rdf.databank.
Returns:
{jQuery.rdf.databank} The jQuery.rdf.databank object itself.
See:
jQuery.rdf#remove

{Integer} size()
Tells you how many triples the databank contains.
$('html').rdf().databank.size();
Returns:
{Integer} The number of triples in the jQuery.rdf.databank.

{String} toString()
Provides a string representation of the databank which simply specifies how many triples it contains.
Returns:
{String}

{jQuery} triples()
Provides a jQuery object containing the triples held in this jQuery.rdf.databank.
Returns:
{jQuery} A jQuery object containing jQuery.rdf.triple objects.

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jul 14 2009 19:56:45 GMT+0100 (BST)