org.hypergraphdb.indexing
Class HGValueIndexer

java.lang.Object
  extended by org.hypergraphdb.indexing.HGIndexer
      extended by org.hypergraphdb.indexing.HGValueIndexer
Direct Known Subclasses:
TargetToTargetIndexer

public abstract class HGValueIndexer
extends HGIndexer

An indexer that not only determines the key in an index entry, but the value as well. By default, HGIndexer implementation provide a key by which to index hypergraph atoms. In other words, atoms are the "default" values for index entries. A HGValueIndexer provides also the value in an index entry in cases where it is not the atom itself.

Author:
Borislav Iordanov

Constructor Summary
HGValueIndexer()
           
HGValueIndexer(HGHandle type)
           
 
Method Summary
abstract  java.lang.Object getValue(HyperGraph graph, java.lang.Object atom)
           Return the value of an index entry based on the passed in atom.
abstract  ByteArrayConverter<?> getValueConverter(HyperGraph graph)
           Return a ByteArrayConverter capable of converting index entry values to/from byte arrays.
 
Methods inherited from class org.hypergraphdb.indexing.HGIndexer
equals, getComparator, getConverter, getKey, getType, hashCode, setType
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HGValueIndexer

public HGValueIndexer()

HGValueIndexer

public HGValueIndexer(HGHandle type)
Method Detail

getValue

public abstract java.lang.Object getValue(HyperGraph graph,
                                          java.lang.Object atom)

Return the value of an index entry based on the passed in atom.


getValueConverter

public abstract ByteArrayConverter<?> getValueConverter(HyperGraph graph)

Return a ByteArrayConverter capable of converting index entry values to/from byte arrays.

Parameters:
graph -
Returns: