Class Index | File Index

## Classes

- _global_
- jQuery
- jQuery.rdf
- jQuery.rdf.blank
- jQuery.rdf.databank
- jQuery.rdf.literal
- jQuery.rdf.pattern
- jQuery.rdf.resource
- jQuery.rdf.rule
- jQuery.rdf.ruleset
- jQuery.rdf.triple
- jQuery.typedValue
- jQuery.uri

# Class jQuery.rdf

A jQuery.rdf object represents the results of a query over its jQuery.rdf#databank. The results of a query are a sequence of objects which represent the bindings of values to the variables used in filter expressions specified using jQuery.rdf#where or jQuery.rdf#optional. Each of the objects in this sequence has associated with it a set of triples that are the sources for the variable bindings, which you can get at using jQuery.rdf#sources.

The jQuery.rdf object itself is a lot like a jQuery object. It has a jQuery.rdf#length and the individual matches can be accessed using `[n]`, but you can also iterate through the matches using jQuery.rdf#map or jQuery.rdf#each.

jQuery.rdf is designed to mirror the functionality of SPARQL while providing an interface that's familiar and easy to use for jQuery programmers.

Defined in: jquery.rdf.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| jQuery.rdf(options) Creates a new jQuery.rdf object.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| databank The databank over which this query operates.
<static> <constant> | jQuery.rdf.first A jQuery.rdf.resource for rdf:first
<static> <constant> | jQuery.rdf.label A jQuery.rdf.resource for rdfs:label
| length The number of matches represented by the jQuery.rdf object.
<static> <constant> | jQuery.rdf.nil A jQuery.rdf.resource for rdf:nil
<static> <constant> | jQuery.rdf.object A jQuery.rdf.resource for rdf:object
<static> <constant> | jQuery.rdf.property A jQuery.rdf.resource for rdf:property
| rdfquery The version of rdfQuery.
<static> <constant> | jQuery.rdf.rest A jQuery.rdf.resource for rdf:rest
<static> <constant> | jQuery.rdf.subject A jQuery.rdf.resource for rdf:subject
<static> <constant> | jQuery.rdf.type A jQuery.rdf.resource for rdf:type

Method Summary
Method Attributes | Method Name and Description
--- | ---
| about(resource, options) Creates a new jQuery.rdf object whose set of bindings include `property` and `value` for every triple that is about the specified resource.
| add(triple, options) Adds a triple to the jQuery.rdf#databank or another jQuery.rdf object to create a union.
| back(property) Navigates from the resource identified by the 'node' binding to another node through the property passed as the argument, like {jQuery.rdf#find}, but backwards.
| base(base) Sets or returns the base URI of the jQuery.rdf#databank.
| describe(bindings) Provides simple concise bounded descriptions of the resources or bindings that are passed in the argument.
| dump(options) Dumps the triples that form the basis of the variable bindings that are the primary product of jQuery.rdf into a format that can be shown to the user or sent to a server.
<static> | jQuery.rdf.dump(triples, options) Dumps the triples passed as the first argument into a format that can be shown to the user or sent to a server.
| each(callback) Iterates over the matches held by the jQuery.rdf object and performs a function on each of them.
| end() Returns the parent jQuery.rdf object, which is equivalent to undoing the most recent filtering operation (such as jQuery.rdf#where or jQuery.rdf#filter).
| eq(n) Returns a new jQuery.rdf object that contains only one set of variable bindings.
| except(query) Creates a new jQuery.rdf object whose databank contains all the triples in this object's databank except for those in the argument's databank.
| filter(property, condition) Creates a new jQuery.rdf object whose set of bindings include only those that satisfy some arbitrary condition.
| find(property) Navigates from the resource identified by the 'node' binding to another node through the property passed as the argument.
| get(num) Either returns the item specified by the argument or turns the jQuery.rdf object into an array.
| group(bindings) Groups the bindings held by this jQuery.rdf object based on the values of the variables passed as the parameter.
| jquery() Returns a jQuery object that wraps this jQuery.rdf object.
| load(data, options) Loads some data into the jQuery.rdf#databank
| map(callback) Iterates over the matches held by the jQuery.rdf object and creates a new jQuery object that holds the result of applying the passed function to each one.
| node(node) Creates a new jQuery.rdf object containing one binding for each selected resource.
| optional(filter, options) Creates a new jQuery.rdf object whose set of bindings might optionally include those based on the filter pattern.
| prefix(prefix, namespace) Sets or returns a namespace binding on the jQuery.rdf#databank.
| remove(triple, options) Removes a triple or several triples from the jQuery.rdf#databank.
| reset() Returns a jQuery.rdf object that includes no filtering (and therefore has no matches) over the jQuery.rdf#databank.
| select(bindings) Filters the variable bindings held by this jQuery.rdf object down to those listed in the bindings parameter.
| size() Returns the number of matches in this jQuery.rdf object (equivalent to jQuery.rdf#length).
| sources() Gets the triples that form the basis of the variable bindings that are the primary product of jQuery.rdf.
| where(filter, options) Creates a new jQuery.rdf object that is the result of filtering the matches on this jQuery.rdf object based on the filter that's passed into it.

Class Detail
jQuery.rdf(options)

Creates a new jQuery.rdf object. This should be invoked as a method rather than constructed using new; indeed you will usually want to generate these objects using a method such as jQuery#rdf or jQuery.rdf#where.

    rdf = jQuery.rdf();

Parameters:
{Object} options Optional
{jQuery.rdf.databank} options.databank Optional
  The databank that this query should operate over.
{jQuery.rdf.triple[]} options.triples Optional
  A set of triples over which the query operates; this is only used if options.databank isn't specified, in which case a new databank with these triples is generated.
{Object} options.namespaces Optional
  An object representing a set of namespace bindings. Rather than passing this in when you construct the jQuery.rdf instance, you will usually want to use the jQuery.rdf#prefix method.
{String|jQuery.uri} options.base Optional
  The base URI used to interpret any relative URIs used within the query.

Returns:
  {jQuery.rdf}

See:
  jQuery#rdf

Field Detail
{jQuery.rdf.databank} databank
The databank over which this query operates.

<static> <constant> {jQuery.rdf.resource} jQuery.rdf.first
A jQuery.rdf.resource for rdf:first

<static> <constant> {jQuery.rdf.resource} jQuery.rdf.label
A jQuery.rdf.resource for rdfs:label

{Integer} length
The number of matches represented by the jQuery.rdf object.

<static> <constant> {jQuery.rdf.resource} jQuery.rdf.nil
A jQuery.rdf.resource for rdf:nil

<static> <constant> {jQuery.rdf.resource} jQuery.rdf.object
A jQuery.rdf.resource for rdf:object

<static> <constant> {jQuery.rdf.resource} jQuery.rdf.property
A jQuery.rdf.resource for rdf:property

{String} rdfquery
The version of rdfQuery.

<static> <constant> {jQuery.rdf.resource} jQuery.rdf.rest
A jQuery.rdf.resource for rdf:rest

<static> <constant> {jQuery.rdf.resource} jQuery.rdf.subject
A jQuery.rdf.resource for rdf:subject

<static> <constant> {jQuery.rdf.resource} jQuery.rdf.type
A jQuery.rdf.resource for rdf:type
Method Detail
{jQuery.rdf} about(resource, options)
Creates a new jQuery.rdf object whose set of bindings include `property` and `value` for every triple that is about the specified resource.

    var rdf = $.rdf()
      .prefix('dc', ns.dc)
      .prefix('foaf', ns.foaf)
      .add('<photo1.jpg> dc:creator <http://www.blogger.com/profile/1109404> .')
      .add('<http://www.blogger.com/profile/1109404> foaf:img <photo1.jpg> .')
      .add('<photo2.jpg> dc:creator <http://www.blogger.com/profile/1109404> .')
      .add('<http://www.blogger.com/profile/1109404> foaf:img <photo2.jpg> .')
      .about('<http://www.blogger.com/profile/1109404>');

Parameters:
{String|jQuery.rdf.resource} resource
  The subject of the matching triples.
{Object} options Optional
{Object} options.namespaces Optional
  An object representing a set of namespace bindings used to interpret the resource if it's a CURIE. Defaults to the namespace bindings defined on the jQuery.rdf#databank.
{String|jQuery.uri} options.base Optional
  The base URI used to interpret the resource if it's a relative URI (wrapped in `<` and `>`). Defaults to the base URI defined on the jQuery.rdf#databank.

Returns:
  {jQuery.rdf} A new jQuery.rdf object whose jQuery.rdf#parent is this jQuery.rdf.

See:
  jQuery.rdf#where
  jQuery.rdf#optional
  jQuery.rdf#filter

{jQuery.rdf} add(triple, options)
Adds a triple to the jQuery.rdf#databank or another jQuery.rdf object to create a union.

    var rdf = $.rdf()
      .prefix('dc', ns.dc)
      .prefix('foaf', ns.foaf)
      .add('<photo1.jpg> dc:creator <http://www.blogger.com/profile/1109404> .')
      .add('<http://www.blogger.com/profile/1109404> foaf:img <photo1.jpg> .');

    var rdfA = $.rdf()
      .prefix('dc', ns.dc)
      .add('<photo1.jpg> dc:creator "Jane"');
    var rdfB = $.rdf()
      .prefix('foaf', ns.foaf)
      .add('<photo1.jpg> foaf:depicts "Jane"');
    var rdf = rdfA.add(rdfB);

Parameters:
{String|jQuery.rdf.triple|jQuery.rdf.pattern|jQuery.rdf} triple
  The triple, jQuery.rdf.pattern or jQuery.rdf object to be added to this one. If the triple is a jQuery.rdf object, the two queries are unioned together. If the triple is a string, it's parsed as a jQuery.rdf.pattern. The pattern will be completed using the current matches on the jQuery.rdf object to create multiple triples, one for each set of bindings.
{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} This jQuery.rdf object.

See:
  jQuery.rdf.databank#add

{jQuery.rdf} back(property)
Navigates from the resource identified by the 'node' binding to another node through the property passed as the argument, like {jQuery.rdf#find}, but backwards.

    var people = $('html').rdf()
      .node('foaf:Person')
      .back('rdf:type');

Parameters:
{String|Object} property
  The property whose value will be the new node.

Returns:
  {jQuery.rdf} A new jQuery.rdf object whose jQuery.rdf#parent is this jQuery.rdf.

See:
  jQuery.rdf#find
  jQuery.rdf#node

base(base)
Sets or returns the base URI of the jQuery.rdf#databank.

    baseURI = jQuery('html').rdf().base();

    jQuery('html').rdf().base('http://www.example.org/');

Parameters:
{String|jQuery.uri} base Optional

Returns:
  A jQuery.uri if no base URI is specified, otherwise returns this jQuery.rdf object.

See:
  jQuery.rdf.databank#base

{jQuery} describe(bindings)
Provides simple concise bounded descriptions of the resources or bindings that are passed in the argument. This mirrors the DESCRIBE form in SPARQL.

    $.rdf.dump($('html').rdf().describe(['']));

    $('html').rdf()
      .where('?person foaf:img ?picture')
      .describe(['?photo'])

Parameters:
{(String|jQuery.rdf.resource)[]} bindings
  An array that can contain strings, jQuery.rdf.resources or a mixture of the two. Any strings that begin with a question mark (`?`) are taken as variable names; each matching resource is described by the function.

Returns:
  {jQuery} A jQuery object that contains jQuery.rdf.triples that describe the listed resources.

See:
  jQuery.rdf.databank#describe

dump(options)
Dumps the triples that form the basis of the variable bindings that are the primary product of jQuery.rdf 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.

See:
  jQuery.rdf.dump

<static> {Object|String} jQuery.rdf.dump(triples, options)
Dumps the triples passed as the first argument into a format that can be shown to the user or sent to a server.

Parameters:
{jQuery.rdf.triple[]} triples
  An array (or jQuery object) of jQuery.rdf.triples.
{Object} options Optional
  Options that control the format of the dump.
{String} options.format Optional, Default: 'application/json'
  The mime type of the format of the dump. The supported formats are:

  mime type | description
  --- | ---
  `application/json` | An RDF/JSON object
  `application/rdf+xml` | An DOMDocument node holding XML in RDF/XML syntax
  `text/turtle` | A String holding a representation of the RDF in Turtle syntax

{Object} options.namespaces Optional, Default: {}
  A set of namespace bindings used when mapping resource URIs to CURIEs or QNames (particularly in a RDF/XML serialisation).
{boolean} options.serialize Optional, Default: false
  If true, rather than creating an Object, the function will return a string which is ready to display or send to a server.
{boolean} options.indent Optional, Default: false
  If true, the serialised (RDF/XML) output has indentation added to it to make it more readable.

Returns:
  {Object|String} The alternative representation of the triples.

{jQuery.rdf} each(callback)
Iterates over the matches held by the jQuery.rdf object and performs a function on each of them. This mirrors the jQuery#each method.

    var rdf = $('html').rdf()
      .where('?photo dc:creator ?creator')
      .where('?creator foaf:img ?photo')
      .each(function () {
        photos.push(this.photo.value);
      });

Parameters:
{Function} callback
  A function that is called for each match on the jQuery.rdf object. Within the function, `this` is set to the object representing the variable bindings. The function can take up to three parameters:
  i
    The index of the match amongst the other matches.
  bindings
    An object representing the variable bindings for the match, the same as `this`.
  triples
    An array of jQuery.rdf.triples associated with the particular match.

Returns:
  {jQuery.rdf} The jQuery.rdf object.

See:
  jQuery.rdf#map

{jQuery.rdf} end()
Returns the parent jQuery.rdf object, which is equivalent to undoing the most recent filtering operation (such as jQuery.rdf#where or jQuery.rdf#filter). This is designed to mirror the jQuery#end method.

    $('html').rdf()
      .where('?person foaf:family_name "Hacker"')
      .where('?person foaf:givenname "Alice"')
      .each(...do something with Alice Hacker...)
      .end()
      .where('?person foaf:givenname "Bob"')
      .each(...do something with Bob Hacker...);

Returns:
  {jQuery.rdf}

{jQuery.rdf} eq(n)
Returns a new jQuery.rdf object that contains only one set of variable bindings. This is designed to mirror the jQuery#eq method.

    var rdf = $.rdf()
      .prefix('foaf', 'http://xmlns.com/foaf/0.1/')
      .add('_:a  foaf:name       "Alice" .')
      .add('_:a  foaf:homepage    .')
      .add('_:b  foaf:name       "Bob" .')
      .add('_:b  foaf:mbox        .')
      .where('?x foaf:name ?name')
      .eq(1);

Parameters:
{Integer} n
  The index number of the match that should be selected.

Returns:
  {jQuery.rdf} A new jQuery.rdf object with just that match.

except(query)
Creates a new jQuery.rdf object whose databank contains all the triples in this object's databank except for those in the argument's databank.

Parameters:
{jQuery.rdf} query

See:
  jQuery.rdf.databank#except

{jQuery.rdf} filter(property, condition)
Creates a new jQuery.rdf object whose set of bindings include only those that satisfy some arbitrary condition. There are two main ways to call this method: with two arguments in which case the first is a binding to be tested and the second represents a condition on the test, or with one argument which is a function that should return true for acceptable bindings.

    var rdf = $.rdf()
      .prefix('foaf', 'http://xmlns.com/foaf/0.1/')
      .add('_:a foaf:surname "Jones" .')
      .add('_:b foaf:surname "Macnamara" .')
      .add('_:c foaf:surname "O\'Malley"')
      .add('_:d foaf:surname "MacFee"')
      .where('?person foaf:surname ?surname')
        .filter('surname', /^Ma?c/)
          .each(function () { scottish.push(this.surname.value); })
        .end()
        .filter('surname', /^O'/)
          .each(function () { irish.push(this.surname.value); })
        .end();

    var rdf = $.rdf()
      .prefix('foaf', 'http://xmlns.com/foaf/0.1/')
      .add('_:a foaf:surname "Jones" .')
      .add('_:b foaf:surname "Macnamara" .')
      .add('_:c foaf:surname "O\'Malley"')
      .add('_:d foaf:surname "MacFee"')
      .where('?person foaf:surname ?surname')
      .filter(function () { return this.surname !== "Jones"; })

Parameters:
{Function|String} property

  In the two-argument version, this is the name of a property to be tested against the condition specified in the second argument. In the one-argument version, this is a function in which `this` is an object whose properties are a set of jQuery.rdf.resource, jQuery.rdf.literal or jQuery.rdf.blank objects and whose arguments are:

  i
    The index of the set of bindings amongst the other matches
  bindings
    An object representing the bindings (the same as `this`)
  triples
    The jQuery.rdf.triples that underly this set of bindings
{RegExp|String} condition
  In the two-argument version of this function, the condition that the property's must match. If it is a regular expression, the value must match the regular expression. If it is a jQuery.rdf.literal, the value of the literal must match the property's value. Otherwise, they must be the same resource.

Returns:
  {jQuery.rdf} A new jQuery.rdf object whose jQuery.rdf#parent is this jQuery.rdf.

See:
  jQuery.rdf#where
  jQuery.rdf#optional
  jQuery.rdf#about

{jQuery.rdf} find(property)
Navigates from the resource identified by the 'node' binding to another node through the property passed as the argument.

    var creators = $('html').rdf()
      .node('<>')
      .find('dc:creator');

Parameters:
{String|Object} property
  The property whose value will be the new node.

Returns:
  {jQuery.rdf} A new jQuery.rdf object whose jQuery.rdf#parent is this jQuery.rdf.

See:
  jQuery.rdf#back
  jQuery.rdf#node

{Object[]|Object} get(num)
Either returns the item specified by the argument or turns the jQuery.rdf object into an array. This mirrors the jQuery#get method.

    $('html').rdf()
      .where('?person a foaf:Person')
      .get(0)
      .subject
      .value;

Parameters:
{Integer} num Optional
  The number of the item to be returned.

Returns:
  {Object[]|Object} Returns either a single Object representing variable bindings or an array of such.

{jQuery} group(bindings)
Groups the bindings held by this jQuery.rdf object based on the values of the variables passed as the parameter.

    // returns one object per person and groups all the names and all the emails together in arrays
    var grouped = rdf
      .where('?person foaf:name ?name')
      .where('?person foaf:email ?email')
      .group('person');

    // returns one object per surname/firstname pair, with the person property being an array in the resulting objects
    var grouped = rdf
      .where('?person foaf:first_name ?forename')
      .where('?person foaf:givenname ?surname')
      .group(['surname', 'forename']);

Parameters:
{String[]} bindings Optional
  The variables to group by. The returned objects will contain all their current properties, but those aside from the specified variables will be arrays listing the relevant values.

Returns:
  {jQuery} A jQuery object containing objects representing the grouped bindings.

{jQuery} jquery()
Returns a jQuery object that wraps this jQuery.rdf object.

Returns:
  {jQuery}

load(data, options)
Loads some data into the jQuery.rdf#databank

Parameters:
data
{Object} options Optional

See:
  jQuery.rdf.databank#load

{jQuery} map(callback)
Iterates over the matches held by the jQuery.rdf object and creates a new jQuery object that holds the result of applying the passed function to each one. This mirrors the jQuery#map method.

    var photos = $('html').rdf()
      .where('?photo dc:creator ?creator')
      .where('?creator foaf:img ?photo')
      .map(function () {
        return this.photo.value;
      });

Parameters:
{Function} callback
  A function that is called for each match on the jQuery.rdf object. Within the function, `this` is set to the object representing the variable bindings. The function can take up to three parameters and should return some kind of value:
  i
    The index of the match amongst the other matches.
  bindings
    An object representing the variable bindings for the match, the same as `this`.
  triples
    An array of jQuery.rdf.triples associated with the particular match.

Returns:
  {jQuery} A jQuery object holding the results of the function for each of the matches on the original jQuery.rdf object.

{jQuery.rdf} node(node)
Creates a new jQuery.rdf object containing one binding for each selected resource.

    // returns an rdfQuery object with a pointer to
    var rdf = $('html').rdf()
      .node('');

Parameters:
{String|Object} node
  The node to be selected. If this is a string beginning with a question mark the resources are those identified by the bindings of that value in the currently selected bindings. Otherwise, only the named resource is selected as the node.

Returns:
  {jQuery.rdf} A new jQuery.rdf object.

See:
  jQuery.rdf#find
  jQuery.rdf#back

{jQuery.rdf} optional(filter, options)
Creates a new jQuery.rdf object whose set of bindings might optionally include those based on the filter pattern.

    var rdf = $.rdf()
      .prefix('foaf', 'http://xmlns.com/foaf/0.1/')
      .prefix('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
      .add('_:a  rdf:type        foaf:Person .')
      .add('_:a  foaf:name       "Alice" .')
      .add('_:a  foaf:mbox       <mailto:alice@example.com> .')
      .add('_:a  foaf:mbox       <mailto:alice@work.example> .')
      .add('_:b  rdf:type        foaf:Person .')
      .add('_:b  foaf:name       "Bob" .')
      .where('?x foaf:name ?name')
      .optional('?x foaf:mbox ?mbox');

Parameters:
{String|jQuery.rdf.pattern} filter
  An pattern for a set of bindings that might be added to those in this jQuery.rdf object.
{Object} options Optional
{Object} options.namespaces Optional
  An object representing a set of namespace bindings used to interpret any CURIEs within the pattern. 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 pattern. Defaults to the base URI defined on the jQuery.rdf#databank.

Returns:
  {jQuery.rdf} A new jQuery.rdf object whose jQuery.rdf#parent is this jQuery.rdf.

See:
  jQuery.rdf#where
  jQuery.rdf#filter
  jQuery.rdf#about

{Object|jQuery.uri|jQuery.rdf} prefix(prefix, namespace)
Sets or returns a namespace binding on the jQuery.rdf#databank.

    namespace = jQuery('html').rdf().prefix('foaf');

    jQuery('html').rdf().prefix('foaf', 'http://xmlns.com/foaf/0.1/');

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.databank#prefix

{jQuery.rdf} remove(triple, options)
Removes a triple or several triples from the jQuery.rdf#databank.

    var rdf = $('html').rdf()
      .prefix('foaf', ns.foaf)
      .where('?person foaf:givenname ?gname')
      .where('?person foaf:family_name ?fname')
      .remove('?person foaf:family_name ?fname');

Parameters:
{String|jQuery.rdf.triple|jQuery.rdf.pattern} triple
  The triple to be removed, or a jQuery.rdf.pattern that matches the triples that should 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 or pattern. 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 or pattern. Defaults to the base URI defined on the jQuery.rdf#databank.

Returns:
  {jQuery.rdf} The jQuery.rdf object itself.

See:
  jQuery.rdf.databank#remove

{jQuery.rdf} reset()
Returns a jQuery.rdf object that includes no filtering (and therefore has no matches) over the jQuery.rdf#databank.

    $('html').rdf()
      .where('?person foaf:family_name "Hacker"')
      .where('?person foaf:givenname "Alice"')
      .each(...do something with Alice Hacker...)
      .reset()
      .where('?person foaf:family_name "Jones"')
      .where('?person foaf:givenname "Bob"')
      .each(...do something with Bob Jones...);

Returns:
  {jQuery.rdf} An empty jQuery.rdf object.

{Object[]} select(bindings)
Filters the variable bindings held by this jQuery.rdf object down to those listed in the bindings parameter. This mirrors the SELECT form in SPARQL.

    var filtered = rdf
      .where('?photo dc:creator ?creator')
      .where('?creator foaf:img ?photo');
    var selected = rdf.select(['creator']);

Parameters:
{String[]} bindings Optional
  The variables that you're interested in. The returned objects will only contain those variables. If bindings is undefined, you will get all the variable bindings in the returned objects.

Returns:
  {Object[]} An array of objects with the properties named by the bindings parameter.

{Integer} size()
Returns the number of matches in this jQuery.rdf object (equivalent to jQuery.rdf#length).

Returns:
  {Integer} The number of matches in this jQuery.rdf object.

See:
  jQuery.rdf#length

{jQuery} sources()
Gets the triples that form the basis of the variable bindings that are the primary product of jQuery.rdf. Getting hold of the triples can be useful for understanding the facts that form the basis of the variable bindings.

    $('html').rdf()
      .where('?thing a foaf:Person')
      .sources()
      .each(function () {
        ...do something with the array of triples...
      });

Returns:
  {jQuery} A jQuery object containing arrays of jQuery.rdf.triple objects. A jQuery object is returned so that you can easily iterate over the contents.

{jQuery.rdf} where(filter, options)
Creates a new jQuery.rdf object that is the result of filtering the matches on this jQuery.rdf object based on the filter that's passed into it.

    var rdf = $.rdf()
      .prefix('foaf', ns.foaf)
      .add('_:a foaf:givenname   "Alice" .')
      .add('_:a foaf:family_name "Hacker" .')
      .add('_:b foaf:givenname   "Bob" .')
      .add('_:b foaf:family_name "Hacker" .')
      .where('?person foaf:family_name "Hacker"')
      .where('?person foaf:givenname "Bob");

Parameters:
{String|jQuery.rdf.pattern} filter
  An expression that filters the triples in the jQuery.rdf#databank to locate matches based on the matches on this jQuery.rdf object. If it's a string, the filter is parsed as a jQuery.rdf.pattern.
{Object} options Optional
{Object} options.namespaces Optional
  An object representing a set of namespace bindings used to interpret any CURIEs within the pattern. 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 pattern. Defaults to the base URI defined on the jQuery.rdf#databank.
{boolean} options.optional Optional
  Not usually used (use jQuery.rdf#optional instead).

Returns:
  {jQuery.rdf} A new jQuery.rdf object whose jQuery.rdf#parent is this jQuery.rdf.

See:
  jQuery.rdf#optional
  jQuery.rdf#filter
  jQuery.rdf#about

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 04 2011 16:40:10 GMT+0100 (MEZ)