org.jrdf.graph.global.index
Class AbstractMoleculeIndexMem
java.lang.Object
org.jrdf.graph.global.index.AbstractMoleculeIndexMem
- All Implemented Interfaces:
- Serializable, MoleculeIndex
- Direct Known Subclasses:
- OSPMoleculeIndexMem, POSMoleculeIndexMem, SPOMoleculeIndexMem
public abstract class AbstractMoleculeIndexMem
- extends Object
- implements MoleculeIndex, Serializable
- See Also:
- Serialized Form
Method Summary |
void |
add(Node first,
Node second,
Node third,
Molecule molecule)
|
void |
clear()
|
boolean |
contains(Node node)
|
Molecule |
getMolecule(Triple headTriple)
|
protected abstract Node[] |
getNodes(Triple triple)
|
long |
getNumberOfMolecules()
|
long |
getNumberOfTriples()
|
Map<Node,Map<Node,Molecule>> |
getSubIndex(Node first)
|
Iterator<Map.Entry<Node,Map<Node,Map<Node,Molecule>>>> |
keySetIterator()
|
void |
remove(Molecule molecule)
|
void |
remove(Node[] nodes)
|
void |
remove(Node first,
Node second,
Node third)
|
boolean |
removeSubIndex(Node first)
|
String |
toString()
|
AbstractMoleculeIndexMem
protected AbstractMoleculeIndexMem()
AbstractMoleculeIndexMem
protected AbstractMoleculeIndexMem(Map<Node,Map<Node,Map<Node,Molecule>>> newIndex)
add
public void add(Node first,
Node second,
Node third,
Molecule molecule)
- Specified by:
add
in interface MoleculeIndex
getNodes
protected abstract Node[] getNodes(Triple triple)
remove
public void remove(Node first,
Node second,
Node third)
throws GraphException
- Specified by:
remove
in interface MoleculeIndex
- Throws:
GraphException
remove
public void remove(Molecule molecule)
throws GraphException
- Specified by:
remove
in interface MoleculeIndex
- Throws:
GraphException
remove
public void remove(Node[] nodes)
throws GraphException
- Throws:
GraphException
clear
public void clear()
- Specified by:
clear
in interface MoleculeIndex
contains
public boolean contains(Node node)
- Specified by:
contains
in interface MoleculeIndex
getMolecule
public Molecule getMolecule(Triple headTriple)
- Specified by:
getMolecule
in interface MoleculeIndex
getNumberOfTriples
public long getNumberOfTriples()
- Specified by:
getNumberOfTriples
in interface MoleculeIndex
getNumberOfMolecules
public long getNumberOfMolecules()
- Specified by:
getNumberOfMolecules
in interface MoleculeIndex
getSubIndex
public Map<Node,Map<Node,Molecule>> getSubIndex(Node first)
- Specified by:
getSubIndex
in interface MoleculeIndex
removeSubIndex
public boolean removeSubIndex(Node first)
- Specified by:
removeSubIndex
in interface MoleculeIndex
keySetIterator
public Iterator<Map.Entry<Node,Map<Node,Map<Node,Molecule>>>> keySetIterator()
- Specified by:
keySetIterator
in interface MoleculeIndex
toString
public String toString()
- Overrides:
toString
in class Object