org.jrdf.graph.local.index.graphhandler
Class AbstractGraphHandler

java.lang.Object
  extended by org.jrdf.graph.local.index.graphhandler.AbstractGraphHandler
All Implemented Interfaces:
GraphHandler
Direct Known Subclasses:
GraphHandler012, GraphHandler120, GraphHandler201

public abstract class AbstractGraphHandler
extends Object
implements GraphHandler

Turn this into delegation rather than inheritance?

Version:
$Revision: 1822 $
Author:
Andrew Newman

Field Summary
protected  NodePool nodePool
           
 
Constructor Summary
AbstractGraphHandler()
           
 
Method Summary
 void dumpIndex(PrintStream out)
          Debug method to see the current state of the first index.
 void reconstructIndices(LongIndex firstIndex, LongIndex secondIndex, LongIndex thirdIndex)
          As 012, 120 and 201 are symmetrical this can be used to reconstruct either two from any one index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jrdf.graph.local.index.graphhandler.GraphHandler
createTriple, getEntries, getSubIndex, remove, removeSubIndex
 

Field Detail

nodePool

protected NodePool nodePool
Constructor Detail

AbstractGraphHandler

public AbstractGraphHandler()
Method Detail

reconstructIndices

public void reconstructIndices(LongIndex firstIndex,
                               LongIndex secondIndex,
                               LongIndex thirdIndex)
                        throws GraphException
Description copied from interface: GraphHandler
As 012, 120 and 201 are symmetrical this can be used to reconstruct either two from any one index. Using the 012 index it will add entries correctly to 120 (secondIndex) and 201 (thirdIndex), or 120 will make 201 (secondIndex) and 012 (thirdIndex) and 201 will produce 120 and 201.

Specified by:
reconstructIndices in interface GraphHandler
Parameters:
firstIndex - the first index.
secondIndex - the second index.
thirdIndex - the third index.
Throws:
GraphException - if the adds fail.

dumpIndex

public void dumpIndex(PrintStream out)
Debug method to see the current state of the first index.