|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jrdf.graph.global.AbstractGlobalizedGraph org.jrdf.graph.global.GlobalizedGraphImpl
public class GlobalizedGraphImpl
In memory implementation of Globalized Graph.
Field Summary |
---|
Fields inherited from class org.jrdf.graph.global.AbstractGlobalizedGraph |
---|
indexes, iteratorFactory, tripleComparator |
Fields inherited from interface org.jrdf.graph.global.GlobalizedGraph |
---|
OBJECT_INDEX, PREDICATE_INDEX, SUBJECT_INDEX |
Constructor Summary | |
---|---|
GlobalizedGraphImpl(MoleculeIndex[] newIndexes,
MoleculeIteratorFactory newIteratorFactory,
TripleComparator newTripleComparator)
Default constructor. |
Method Summary | |
---|---|
void |
add(Molecule molecule)
Adds the given molecule and its associated triples to the graph. |
void |
clear()
Remove all molecules from the graph. |
void |
close()
Closes any open resources. |
boolean |
contains(Molecule molecule)
Check to see if a given molecule exists - or part thereof. |
boolean |
contains(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Check to see if the given triple exists within the graph. |
boolean |
contains(Triple triple)
Check to see if the given triple exists within the graph. |
ClosableIterator<Molecule> |
find(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Find a triple that may contain wildcards - any subject, any predicate, and any object. |
Molecule |
getMolecule(Triple headTriple)
Retrieves the molecule with the given head triple. |
MoleculeIteratorFactory |
getMoleculeIteratorFactory()
Returns a iterator factory for generating the various types of iterators required. |
long |
getNumberOfMolecules()
Returns number of molecules in the graph. |
long |
getNumberOfTriples()
Returns the number of triples in the graph. |
boolean |
isEmpty()
Returns true if the graph is empty i.e. the number of triples is 0. |
void |
remove(Molecule molecule)
This will find the given molecule and remove it and any statements it contains. |
Methods inherited from class org.jrdf.graph.global.AbstractGlobalizedGraph |
---|
containsValue, findValue, init, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GlobalizedGraphImpl(MoleculeIndex[] newIndexes, MoleculeIteratorFactory newIteratorFactory, TripleComparator newTripleComparator)
newIndexes
- newIteratorFactory
- Method Detail |
---|
public ClosableIterator<Molecule> find(SubjectNode subject, PredicateNode predicate, ObjectNode object)
GlobalizedGraph
subject
- The subject to find or AnySubjectNode to indicate any subject.predicate
- The predicate to find or AnyPredicateNode to indicate any predicate.object
- The object to find or AnyObjectNode to indicate any object.
public boolean contains(Molecule molecule)
GlobalizedGraph
molecule
- The triple to find.
public boolean contains(SubjectNode subject, PredicateNode predicate, ObjectNode object)
GlobalizedGraph
subject
- The subject to find or AnySubjectNode to indicate any subject.predicate
- The predicate to find or AnyPredicateNode to indicate any predicate.object
- The object to find or AnyObjectNode to indicate any object.
public boolean contains(Triple triple)
GlobalizedGraph
triple
- The triple to find.
public void add(Molecule molecule)
GlobalizedGraph
molecule
- the molecule to add.public void remove(Molecule molecule) throws GraphException
GlobalizedGraph
molecule
- the molecule to remove.
GraphException
public Molecule getMolecule(Triple headTriple)
GlobalizedGraph
headTriple
- the head triple to use to get the molecule.
public void clear()
GlobalizedGraph
public boolean isEmpty()
GlobalizedGraph
public long getNumberOfMolecules()
GlobalizedGraph
public long getNumberOfTriples()
GlobalizedGraph
public MoleculeIteratorFactory getMoleculeIteratorFactory()
GlobalizedGraph
public void close()
GlobalizedGraph
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |