org.jrdf.graph.index.graphhandler.mem
Class GraphHandler012
java.lang.Object
org.jrdf.graph.index.graphhandler.AbstractGraphHandler
org.jrdf.graph.index.graphhandler.mem.GraphHandler012
- All Implemented Interfaces:
- GraphHandler
public class GraphHandler012
- extends AbstractGraphHandler
- implements GraphHandler
Handles operations on 012 index.
- Version:
- $Revision: 1045 $
- Author:
- Andrew Newman
Method Summary |
Node[] |
createTriple(Long[] nodes)
Creates the globalized nodes based on the internal representation of the nodes. |
Iterator<Map.Entry<Long,Map<Long,Set<Long>>>> |
getEntries()
Returns an iterator over an internal representation of the graph in the fixed order based on the underlying
index. |
void |
remove(Long[] currentNodes)
Removes a triple from the other indexes of the graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphHandler012
public GraphHandler012(LongIndex[] indexes,
NodePool nodePool)
getEntries
public Iterator<Map.Entry<Long,Map<Long,Set<Long>>>> getEntries()
- Description copied from interface:
GraphHandler
- Returns an iterator over an internal representation of the graph in the fixed order based on the underlying
index.
- Specified by:
getEntries
in interface GraphHandler
- Returns:
- an iterator over an internal representation of the graph in the fixed order based on the underlying
index.
createTriple
public Node[] createTriple(Long[] nodes)
throws TripleFactoryException
- Description copied from interface:
GraphHandler
- Creates the globalized nodes based on the internal representation of the nodes. This may move to the NodePool
interface.
- Specified by:
createTriple
in interface GraphHandler
- Parameters:
nodes
- an array of three triple values to create.
- Returns:
- an array of three nodes.
- Throws:
TripleFactoryException
- if the nodes could not be mapped - the nodes must refer to something that already
have existed.
remove
public void remove(Long[] currentNodes)
throws GraphException
- Description copied from interface:
GraphHandler
- Removes a triple from the other indexes of the graph. For example, if this is the 012 GraphHandler it will
remove the 120 and 201.
- Specified by:
remove
in interface GraphHandler
- Parameters:
currentNodes
- the array of nodes to remove.
- Throws:
GraphException
- if the nodes do not exist.