org.openrdf.model
Interface Resource

All Superinterfaces:
java.lang.Comparable, java.io.Serializable, Value
All Known Subinterfaces:
BNode, URI
All Known Implementing Classes:
BlankNode, Node, ResourceNode

public interface Resource
extends Value

The interface for all RDF resources (URIs and bNodes).


Method Summary
 void addProperty(URI property, Value value)
          Adds a property to this Resource in the RDF graph.
 StatementIterator getSubjectStatements()
          Gets all statements from the RDF graph for which this resource is the subject.
 
Methods inherited from interface org.openrdf.model.Value
getObjectStatements
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

addProperty

public void addProperty(URI property,
                        Value value)
                 throws GraphException
Adds a property to this Resource in the RDF graph. The result is that a statement of the form (this, property, value) is added.

Parameters:
property - the predicate of the statement that should be added.
value - the value of the statements that should be added.
Throws:
GraphException

getSubjectStatements

public StatementIterator getSubjectStatements()
                                       throws GraphException
Gets all statements from the RDF graph for which this resource is the subject.

Throws:
GraphException