Class Index | File Index

Classes


Class jQuery.rdf.triple

Represents an RDF triple.
Defined in: jquery.rdf.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
jQuery.rdf.triple(subject, property, value, options)
Creates a new jQuery.rdf.triple object.
Field Summary
Field Attributes Field Name and Description
 
(Experimental) The named graph the triple belongs to.
 
The object of the triple.
 
The property of the triple.
 
The source of the triple, which might be a node within the page (if the RDF is generated from the page) or a string holding the pattern that generated the triple.
 
The subject of the triple.
Method Summary
Method Attributes Method Name and Description
 
dump()
Returns a RDF/JSON representation of this triple.
 
Always returns true for triples.
 
Returns a string representing this triple in Turtle format.
 
triple(bindings)
Always returns this triple.
Class Detail
jQuery.rdf.triple(subject, property, value, options)

Creates a new jQuery.rdf.triple object. This should be invoked as a method rather than constructed using new; indeed you will not usually want to generate these objects directly, since they are automatically created from strings where necessary, such as by jQuery.rdf#add.

pattern = $.rdf.triple('<>', $.rdf.type, 'foaf:Person', { namespaces: { foaf: "http://xmlns.com/foaf/0.1/" }});
pattern = $.rdf.triple('<> a foaf:Person', { 
  namespaces: { foaf: "http://xmlns.com/foaf/0.1/" }
});
Parameters:
{String|jQuery.rdf.resource|jQuery.rdf.blank} subject
The subject of the triple, or a single string that defines the entire triple. If the subject is specified as a string, it can be a fixed resource (<uri> or curie) or a blank node (_:id).
{String|jQuery.rdf.resource} property Optional
The property pattern. If the property is specified as a string, it must be a fixed resource (<uri> or curie).
{String|jQuery.rdf.resource|jQuery.rdf.blank|jQuery.rdf.literal} value Optional
The value pattern. If the property is specified as a string, it can be a fixed resource (<uri> or curie), a blank node (_:id), or a literal ("value").
{Object} options Optional
Initialisation of the triple.
{Object} options.namespaces Optional
An object representing a set of namespace bindings used when interpreting the CURIEs in the subject, property and object.
{String|jQuery.uri} options.base Optional
The base URI used to interpret any relative URIs used within the subject, property and object.
Throws:
{String}
Errors if any of the strings are not in a recognised format.
Returns:
{jQuery.rdf.triple} The newly-created triple.
See:
jQuery.rdf#add
jQuery.rdf.resource
jQuery.rdf.blank
jQuery.rdf.literal
Field Detail
{jQuery.rdf.resource|jQuery.rdf.blank} graph
(Experimental) The named graph the triple belongs to.

{jQuery.rdf.resource|jQuery.rdf.blank|jQuery.rdf.literal} object
The object of the triple.

{jQuery.rdf.resource} property
The property of the triple.

source
The source of the triple, which might be a node within the page (if the RDF is generated from the page) or a string holding the pattern that generated the triple.

{jQuery.rdf.resource|jQuery.rdf.blank} subject
The subject of the triple.
Method Detail
{Object} dump()
Returns a RDF/JSON representation of this triple.
Returns:
{Object}

isFixed()
Always returns true for triples.
See:
jQuery.rdf.pattern#isFixed

{String} toString()
Returns a string representing this triple in Turtle format.
Returns:
{String}

triple(bindings)
Always returns this triple.
Parameters:
bindings
See:
jQuery.rdf.pattern#triple

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