org.terrier.structures
Class DocumentIndexEntry

java.lang.Object
  extended by org.terrier.structures.DocumentIndexEntry
All Implemented Interfaces:
org.apache.hadoop.io.Writable, BitFilePosition, BitIndexPointer, Pointer
Direct Known Subclasses:
BasicDocumentIndexEntry, SimpleDocumentIndexEntry

public abstract class DocumentIndexEntry
extends Object
implements BitIndexPointer, org.apache.hadoop.io.Writable

A document index entry. Also acts as a pointer into the direct index.


Field Summary
 
Fields inherited from interface org.terrier.structures.BitIndexPointer
BIT_MASK, FILE_SHIFT, MAX_FILE_ID
 
Constructor Summary
DocumentIndexEntry()
           
 
Method Summary
 int getDocumentLength()
          Get the length of the document
 byte getFileNumber()
          Returns the file number: 0-32
 int getNumberOfEntries()
          Returns number of "things" that this pointer refers to
 long getOffset()
          Return the offset
 byte getOffsetBits()
          Return the offset bits
 void setDocumentLength(int l)
          Set the length of the document
 void setFileNumber(byte fileId)
          Set the file number
 void setOffset(long _bytes, byte _bits)
          Set the offset in bytes and bits
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.terrier.structures.BitIndexPointer
setBitIndexPointer
 
Methods inherited from interface org.terrier.structures.BitFilePosition
setOffset
 
Methods inherited from interface org.apache.hadoop.io.Writable
readFields, write
 
Methods inherited from interface org.terrier.structures.Pointer
pointerToString, setNumberOfEntries, setPointer
 

Constructor Detail

DocumentIndexEntry

public DocumentIndexEntry()
Method Detail

getDocumentLength

public int getDocumentLength()
Get the length of the document


setDocumentLength

public void setDocumentLength(int l)
Set the length of the document


getNumberOfEntries

public int getNumberOfEntries()
Returns number of "things" that this pointer refers to

Specified by:
getNumberOfEntries in interface Pointer

getOffsetBits

public byte getOffsetBits()
Return the offset bits

Specified by:
getOffsetBits in interface BitFilePosition

getOffset

public long getOffset()
Return the offset

Specified by:
getOffset in interface BitFilePosition

getFileNumber

public byte getFileNumber()
Returns the file number: 0-32

Specified by:
getFileNumber in interface BitIndexPointer

setFileNumber

public void setFileNumber(byte fileId)
Set the file number

Specified by:
setFileNumber in interface BitIndexPointer

setOffset

public void setOffset(long _bytes,
                      byte _bits)
Set the offset in bytes and bits

Specified by:
setOffset in interface BitFilePosition

toString

public String toString()

Overrides:
toString in class Object


Terrier 3.6. Copyright © 2004-2011 University of Glasgow