Class jQuery.rdf.resource
Represents an RDF resource.
Defined in: jquery.rdf.js.
Constructor Attributes | Constructor Name and Description |
---|---|
jQuery.rdf.resource(value, options)
Creates a new jQuery.rdf.resource object.
|
Field Attributes | Field Name and Description |
---|---|
Always fixed to 'uri' for resources.
|
|
The URI for the resource.
|
Method Attributes | Method Name and Description |
---|---|
dump()
Returns a RDF/JSON representation of this triple.
|
|
toString()
Returns a string representing this resource in Turtle format.
|
Class Detail
jQuery.rdf.resource(value, options)
Creates a new jQuery.rdf.resource 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.
thisPage = $.rdf.resource('<>');
foaf.Person = $.rdf.resource('foaf:Person', { namespaces: ns });
- Parameters:
- {String|jQuery.uri} value
- The value of the resource. If it's a string it must be in the format
<uri>
orcurie
. - {Object} options Optional
- Initialisation of the resource.
- {Object} options.namespaces Optional
- An object representing a set of namespace bindings used when interpreting the CURIE specifying the resource.
- {String|jQuery.uri} options.base Optional
- The base URI used to interpret any relative URIs used within the URI specifying the resource.
- Throws:
- {String}
- Errors if the string is not in a recognised format.
- Returns:
- {jQuery.rdf.resource} The newly-created resource.
Field Detail
{String}
type
Always fixed to 'uri' for resources.
{jQuery.rdf.uri}
value
The URI for the resource.
Method Detail
{Object}
dump()
Returns a RDF/JSON representation of this triple.
- Returns:
- {Object}
{String}
toString()
Returns a string representing this resource in Turtle format.
- Returns:
- {String}