|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jrdf.graph.mem.GraphImpl
A memory based RDF Graph.
| Constructor Summary | |
GraphImpl()
Default constructor. |
|
| Method Summary | |
void |
add(Iterator triples)
Adds an iterator containing triples into the graph. |
void |
add(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Adds a triple to the graph. |
void |
add(Triple triple)
Adds a triple to the graph. |
void |
close()
Closes any underlying resources used by this graph. |
boolean |
contains(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Test the graph for the occurrence of a statement. |
boolean |
contains(Triple triple)
Test the graph for the occurrence of the triple. |
ClosableIterator |
find(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Returns an iterator to a set of statements that match a given subject, predicate and object. |
ClosableIterator |
find(Triple triple)
Returns an iterator to a set of statements that match a given subject, predicate and object. |
GraphElementFactory |
getElementFactory()
Returns the node factory for the graph, or creates one. |
long |
getNumberOfTriples()
Returns the number of triples in the graph. |
TripleFactory |
getTripleFactory()
Returns the triple factory for the graph, or creates one. |
boolean |
isEmpty()
Returns true if the graph is empty i.e. the number of triples is 0. |
void |
remove(Iterator triples)
Removes an iterator containing triples from the graph. |
void |
remove(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Removes a triple from the graph. |
void |
remove(Triple triple)
Removes a triple from the graph. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GraphImpl()
throws GraphException
GraphException - There was an error creating the factory.| Method Detail |
public boolean contains(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
throws GraphException
contains in interface Graphsubject - The subject to find or null to indicate any subject.predicate - The predicate to find or null to indicate any predicate.object - The object to find or null to indicate any object.
GraphException - If there was an error accessing the graph.
public boolean contains(Triple triple)
throws GraphException
contains in interface Graphtriple - The triple to find.
GraphException - If there was an error accessing the graph.
public ClosableIterator find(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
throws GraphException
find in interface Graphsubject - The subject to find or null to indicate any subject.predicate - The predicate to find or null to indicate any predicate.object - ObjectNode The object to find or null to indicate any object.
GraphException - If there was an error accessing the graph.
public ClosableIterator find(Triple triple)
throws GraphException
find in interface Graphtriple - The triple to find.
GraphException - If there was an error accessing the graph.
public void add(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
throws GraphException
add in interface Graphsubject - The subject.predicate - The predicate.object - The object.
GraphException - If the statement can't be made.
public void add(Triple triple)
throws GraphException
add in interface Graphtriple - The triple.
GraphException - If the statement can't be made.
public void add(Iterator triples)
throws GraphException
add in interface Graphtriples - The triple iterator.
GraphException - If the statements can't be made.
public void remove(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
throws GraphException
remove in interface Graphsubject - The subject.predicate - The predicate.object - The object.
GraphException - If there was an error revoking the statement, for
example if it didn't exist.
public void remove(Triple triple)
throws GraphException
remove in interface Graphtriple - The triple.
GraphException - If there was an error revoking the statement, for
example if it didn't exist.
public void remove(Iterator triples)
throws GraphException
remove in interface Graphtriples - The triple iterator.
GraphException - If the statements can't be revoked.public GraphElementFactory getElementFactory()
getElementFactory in interface Graphpublic TripleFactory getTripleFactory()
getTripleFactory in interface Graph
public long getNumberOfTriples()
throws GraphException
getNumberOfTriples in interface GraphGraphException - If the statements number of statements in the graph
fails to be found.
public boolean isEmpty()
throws GraphException
isEmpty in interface GraphGraphException - If the statements number of statements in the graph
fails to be found.public void close()
close in interface Graph
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||