com.timeindexing.index
Class IncoreIndexItem

java.lang.Object
  extended bycom.timeindexing.index.IncoreIndexItem
All Implemented Interfaces:
IndexItem, ManagedIndexItem, java.io.Serializable
Direct Known Subclasses:
FileIndexItem

public class IncoreIndexItem
extends java.lang.Object
implements IndexItem, ManagedIndexItem, java.io.Serializable

A Full implementation of an IndexItem. Every value is explicitly held.

See Also:
Serialized Form

Constructor Summary
protected IncoreIndexItem(Timestamp dataTS, Timestamp indexTS, DataAbstraction data, DataType type, ID id, ID annotationID)
          Construct a IncoreIndexItem from
protected IncoreIndexItem(Timestamp dataTS, Timestamp indexTS, DataAbstraction data, Size dataSize, DataType type, ID id, ID annotationID)
          Construct a IncoreIndexItem from
  IncoreIndexItem(Timestamp dataTS, Timestamp indexTS, DataItem dataitem, DataType type, ID id, ID annotationID)
          Construct a IncoreIndexItem from
 
Method Summary
 IndexItem follow()
          Follow this reference.
 ID getAnnotations()
          The ID of annotations associated with this IndexItem.
 java.nio.ByteBuffer getData()
          A ByteBuffer of the Data being indexed.
 DataAbstraction getDataAbstraction()
          The DataAbstraction of the Data being indexed.
 Size getDataSize()
          The size of the data item being referenced.
 Timestamp getDataTimestamp()
          The timestamp in the data of the current IndexItem.
 DataType getDataType()
          The type of the data item being referenced.
 Index getIndex()
          Get the index this IndexItem is in.
 Timestamp getIndexTimestamp()
          The timestamp of the current IndexItem.
 ID getItemID()
          The item ID.
 Timestamp getLastAccessTime()
          Get the last time this IndexItem was accessed.
 AbsolutePosition getPosition()
          Get the index position this IndexItem is in.
 boolean isReference()
          Is the data held by the IndexItem, actually an IndexReference.
 ManagedIndexItem setIndex(Index index)
          Set the index this IndexItem is in.
 ManagedIndexItem setLastAccessTime()
          Set the last access time of the item.
 ManagedIndexItem setPosition(AbsolutePosition pos)
          Set the index position that this IndexItem is in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncoreIndexItem

public IncoreIndexItem(Timestamp dataTS,
                       Timestamp indexTS,
                       DataItem dataitem,
                       DataType type,
                       ID id,
                       ID annotationID)
Construct a IncoreIndexItem from

Parameters:
dataTS - a data timestamp. The Data timestamp is the same as the Sender timestamp.
indexTS - an index timestamp. The Index timestamp is the same as the Receiver timestamp.
type - the type of the data
id - an index ID
annotationID - an ID for annotations

IncoreIndexItem

protected IncoreIndexItem(Timestamp dataTS,
                          Timestamp indexTS,
                          DataAbstraction data,
                          DataType type,
                          ID id,
                          ID annotationID)
Construct a IncoreIndexItem from

Parameters:
dataTS - a data timestamp. The Data timestamp is the same as the Sender timestamp.
indexTS - an index timestamp. The Index timestamp is the same as the Receiver timestamp.
data - some data as a Item
type - the type of the data
id - an index ID
annotationID - an ID for annotations

IncoreIndexItem

protected IncoreIndexItem(Timestamp dataTS,
                          Timestamp indexTS,
                          DataAbstraction data,
                          Size dataSize,
                          DataType type,
                          ID id,
                          ID annotationID)
Construct a IncoreIndexItem from

Parameters:
dataTS - a data timestamp. The Data timestamp is the same as the Sender timestamp.
indexTS - an index timestamp. The Index timestamp is the same as the Receiver timestamp.
data - some data as a Item
type - the type of the data
id - an index ID
annotationID - an ID for annotations
Method Detail

getIndexTimestamp

public Timestamp getIndexTimestamp()
The timestamp of the current IndexItem.

Specified by:
getIndexTimestamp in interface IndexItem

getDataTimestamp

public Timestamp getDataTimestamp()
The timestamp in the data of the current IndexItem.

Specified by:
getDataTimestamp in interface IndexItem

getData

public java.nio.ByteBuffer getData()
A ByteBuffer of the Data being indexed.

Specified by:
getData in interface IndexItem

getDataSize

public Size getDataSize()
The size of the data item being referenced.

Specified by:
getDataSize in interface IndexItem

getDataAbstraction

public DataAbstraction getDataAbstraction()
The DataAbstraction of the Data being indexed.

Specified by:
getDataAbstraction in interface ManagedIndexItem

getDataType

public DataType getDataType()
The type of the data item being referenced.

Specified by:
getDataType in interface IndexItem

getItemID

public ID getItemID()
The item ID.

Specified by:
getItemID in interface IndexItem

getAnnotations

public ID getAnnotations()
The ID of annotations associated with this IndexItem.

Specified by:
getAnnotations in interface IndexItem

getPosition

public AbsolutePosition getPosition()
Get the index position this IndexItem is in.

Specified by:
getPosition in interface IndexItem

setPosition

public ManagedIndexItem setPosition(AbsolutePosition pos)
Set the index position that this IndexItem is in.

Specified by:
setPosition in interface ManagedIndexItem

getIndex

public Index getIndex()
Get the index this IndexItem is in.

Specified by:
getIndex in interface IndexItem

setIndex

public ManagedIndexItem setIndex(Index index)
Set the index this IndexItem is in.

Specified by:
setIndex in interface ManagedIndexItem

getLastAccessTime

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

Specified by:
getLastAccessTime in interface IndexItem

setLastAccessTime

public ManagedIndexItem setLastAccessTime()
Set the last access time of the item.

Specified by:
setLastAccessTime in interface ManagedIndexItem

isReference

public boolean isReference()
Is the data held by the IndexItem, actually an IndexReference.

Specified by:
isReference in interface IndexItem

follow

public IndexItem follow()
                 throws GetItemException
Follow this reference.

Specified by:
follow in interface IndexItem
Returns:
null if the DataAbstraction is not an IndexReference
Throws:
GetItemException - if the reference cannot be followed successfully