rdf_api::Resource Interface Reference

rdf_api::Resource Interface Reference

A resource in RDF. More...

Inheritance diagram for rdf_api::Resource:
Collaboration diagram for rdf_api::Resource:

Public Member Functions

TripleSet getTriplesOutOfByPredicate (in Resource aPredicate)
 Finds all the triples for which this node is the subject and the parameter is the predicate.
Triple getTripleOutOfByPredicate (in Resource aPredicate) raises (RDFProcessingError)
 Finds a triple for which this node is the subject and the parameter is the predicate if possible.
boolean hasTripleOutOf (in Resource aPredicate, in Node aObject)
 Determines if there is a triple where this node is the subject, and aPredicate is the predicate and aObject is the object.
void createTripleOutOf (in Resource aPredicate, in Node aObject)
 Creates a triple where this node is the subject, and aPredicate is the predicate and aObject is the object.
TripleSet getTriplesOutOfByObject (in Node aObject)
 Finds all the triples for which this node is the subject and the parameter is the object.
TripleSet getTriplesWherePredicate ()
 Finds all the triples for which this node is the predicate.
TripleSet getTriplesWhereSubject ()
 Finds all the triples for which this node is the subject.
Container findOrMakeContainer (in Resource aPredicate, in Resource aContainerType)
 Finds or makes a particular container out of 'this', with the specified predicate, and the specified type.
- Public Member Functions inherited from rdf_api::Node
TripleSet getTriplesInto ()
 Finds all the triples for which this node is the object.
TripleSet getTriplesIntoByPredicate (in Resource aPredicate)
 Fetches all triples for which this node is the object and aPredicate is the predicate.
- Public Member Functions inherited from XPCOM::IObject
void add_ref ()
 Called to indicate that some code is keeping an owning reference to the object.
oneway void release_ref ()
 Removes a reference to an object which was created by some other means (e.g.
IObject query_interface (in utf8string id)
 Returns an IObject of the same implementation, which supports a specific interface.

Public Attributes

readonly attribute Container correspondingContainer
 Retrieves a 'Container' interface around this Resource.

Detailed Description

A resource in RDF.

This is always associated with a specific datasource.

Definition at line 102 of file RDF_APISPEC.idl.

Member Function Documentation

void rdf_api::Resource::createTripleOutOf ( in Resource  aPredicate,
in Node  aObject 
)

Creates a triple where this node is the subject, and aPredicate is the predicate and aObject is the object.

If the triple being asserted has already been asserted, then nothing happens.

Parameters
aPredicateThe predicate for the new triple.
aObjectThe object for the new triple.
Container rdf_api::Resource::findOrMakeContainer ( in Resource  aPredicate,
in Resource  aContainerType 
)

Finds or makes a particular container out of 'this', with the specified predicate, and the specified type.

If there are multiple existing containers, the returned container is a merged view of all containers. The underlying RDF is only changed if the container doesn't already exist, in which case: A new triple (subject=this) (predicate=aPredicate) (object=new blank node 'A') is made. A new triple (subject=the new blank node 'A') (predicate=RDF type) (object=aContainerType) is made. The returned Container is the correspondingContainer around the new blank node 'A'.

Triple rdf_api::Resource::getTripleOutOfByPredicate ( in Resource  aPredicate) raises (RDFProcessingError)

Finds a triple for which this node is the subject and the parameter is the predicate if possible.

Parameters
aPredicateThe predicate we are searching on.
Returns
A triple meeting the constraints. RDFProcessingError if there was no matching triple found.
TripleSet rdf_api::Resource::getTriplesOutOfByObject ( in Node  aObject)

Finds all the triples for which this node is the subject and the parameter is the object.

Parameters
aObjectThe object we are searching on.
Returns
The set of all triples meeting the constraints.
TripleSet rdf_api::Resource::getTriplesOutOfByPredicate ( in Resource  aPredicate)

Finds all the triples for which this node is the subject and the parameter is the predicate.

Parameters
aPredicateThe predicate we are searching on.
Returns
The set of all triples meeting the constraints.
TripleSet rdf_api::Resource::getTriplesWherePredicate ( )

Finds all the triples for which this node is the predicate.

Returns
The set of all triples meeting the constraints.
TripleSet rdf_api::Resource::getTriplesWhereSubject ( )

Finds all the triples for which this node is the subject.

Returns
The set of all triples meeting the constraints.
boolean rdf_api::Resource::hasTripleOutOf ( in Resource  aPredicate,
in Node  aObject 
)

Determines if there is a triple where this node is the subject, and aPredicate is the predicate and aObject is the object.

Parameters
aPredicateThe predicate to search for.
aObjectThe object to search for.
Returns
True if and only if there is a matching triple.

Member Data Documentation

readonly attribute Container rdf_api::Resource::correspondingContainer

Retrieves a 'Container' interface around this Resource.

Definition at line 165 of file RDF_APISPEC.idl.