| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GlobalizedGraph
Represents a globalized graph, which maintains molecules. This allows us to better handle blank nodes.
| Field Summary | |
|---|---|
| static int | OBJECT_INDEXPosition in the index for OSP. | 
| static int | PREDICATE_INDEXPosition in the index for POS. | 
| static int | SUBJECT_INDEXPosition in the index for SPO. | 
| 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. | 
| Field Detail | 
|---|
static final int SUBJECT_INDEX
static final int PREDICATE_INDEX
static final int OBJECT_INDEX
| Method Detail | 
|---|
boolean contains(SubjectNode subject,
                 PredicateNode predicate,
                 ObjectNode object)
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.
boolean contains(Triple triple)
triple - The triple to find.
boolean contains(Molecule molecule)
molecule - The triple to find.
ClosableIterator<Molecule> find(SubjectNode subject,
                                PredicateNode predicate,
                                ObjectNode object)
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.
void add(Molecule molecule)
molecule - the molecule to add.
void remove(Molecule molecule)
            throws GraphException
molecule - the molecule to remove.
GraphExceptionMolecule getMolecule(Triple headTriple)
headTriple - the head triple to use to get the molecule.
void close()
void clear()
boolean isEmpty()
GraphException - If the statements number of statements in the graph fails to be found.long getNumberOfMolecules()
long getNumberOfTriples()
MoleculeIteratorFactory getMoleculeIteratorFactory()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||