com.timeindexing.index
Class IndexReferenceDataHolder

java.lang.Object
  extended bycom.timeindexing.index.IndexReferenceDataHolder
All Implemented Interfaces:
DataAbstraction, DataHolder, IndexReference

public class IndexReferenceDataHolder
extends java.lang.Object
implements IndexReference, DataHolder

A class that refers to an IndexItem in another Index.


Constructor Summary
IndexReferenceDataHolder(ID indexID, Position itemPosition)
          Construct an IndexReferenceDataHolder given the URI of the Index to refer to, the ID of the Index to refer to, and the Position of an IndexItem to refer to.
IndexReferenceDataHolder(ManagedIndexItem myIndexItem, ID indexID, Position itemPosition)
          Construct an IndexReferenceDataHolder given the IndexItem this is held in, the ID of the Index to refer to and the Position of an IndexItem to refer to.
 
Method Summary
 IndexItem follow()
          Follow this reference.
 java.nio.ByteBuffer getBytes()
          Get the data itself.
 ID getIndexID()
          The ID of the index being referenced.
 IndexItem getIndexItem()
          Get the IndexItem this IndexReference is associated with.
 Position getIndexItemPosition()
          The Position of the IndexItem being referenced.
 java.net.URI getIndexURI()
          The URI of the index being referenced.
 Timestamp getLastAccessTime()
          Get the last time this object was accessed.
 Timestamp getReadTime()
          Get the time the data was read from storage into this object.
 Size getSize()
          Get the size of the data.
 IndexReferenceDataHolder setIndexItem(IndexItem item)
          Set the IndexItem this IndexReference is associated with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexReferenceDataHolder

public IndexReferenceDataHolder(ManagedIndexItem myIndexItem,
                                ID indexID,
                                Position itemPosition)
Construct an IndexReferenceDataHolder given the IndexItem this is held in, the ID of the Index to refer to and the Position of an IndexItem to refer to.


IndexReferenceDataHolder

public IndexReferenceDataHolder(ID indexID,
                                Position itemPosition)
Construct an IndexReferenceDataHolder given the URI of the Index to refer to, the ID of the Index to refer to, and the Position of an IndexItem to refer to.

Method Detail

getIndexURI

public java.net.URI getIndexURI()
The URI of the index being referenced.

Specified by:
getIndexURI in interface IndexReference

getIndexID

public ID getIndexID()
The ID of the index being referenced.

Specified by:
getIndexID in interface IndexReference

getIndexItemPosition

public Position getIndexItemPosition()
The Position of the IndexItem being referenced.

Specified by:
getIndexItemPosition in interface IndexReference

follow

public IndexItem follow()
                 throws GetItemException
Follow this reference.

Specified by:
follow in interface IndexReference
Throws:
GetItemException

getBytes

public java.nio.ByteBuffer getBytes()
Get the data itself. This should follow the Reference.

Specified by:
getBytes in interface DataHolder

getSize

public Size getSize()
Get the size of the data. This should follow the Reference.

Specified by:
getSize in interface DataAbstraction

getLastAccessTime

public Timestamp getLastAccessTime()
Get the last time this object was accessed.

Specified by:
getLastAccessTime in interface DataHolder

getReadTime

public Timestamp getReadTime()
Get the time the data was read from storage into this object.

Specified by:
getReadTime in interface DataHolder

getIndexItem

public IndexItem getIndexItem()
Get the IndexItem this IndexReference is associated with.


setIndexItem

public IndexReferenceDataHolder setIndexItem(IndexItem item)
Set the IndexItem this IndexReference is associated with.