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.resource

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

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

Field Summary
Field Attributes | Field Name and Description
--- | ---
| type Always fixed to 'uri' for resources.
| value The URI for the resource.

Method Summary
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>` or `curie`.
{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.

See:
  jQuery.rdf.pattern
  jQuery.rdf.triple
  jQuery.rdf.blank
  jQuery.rdf.literal

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}

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