org.terrier.structures
Class BlockFieldLexiconEntry

java.lang.Object
  extended by org.terrier.structures.LexiconEntry
      extended by org.terrier.structures.BasicLexiconEntry
          extended by org.terrier.structures.BlockFieldLexiconEntry
All Implemented Interfaces:
java.io.Serializable, org.apache.hadoop.io.Writable, BitFilePosition, BitIndexPointer, BlockEntryStatistics, EntryStatistics, FieldEntryStatistics, Pointer

public class BlockFieldLexiconEntry
extends BasicLexiconEntry
implements FieldEntryStatistics, BlockEntryStatistics

A LexiconEntry with field support

See Also:
Serialized Form

Nested Class Summary
static class BlockFieldLexiconEntry.Factory
          Factory for creating LexiconEntries
 
Field Summary
protected  int blockCount
           
protected  int[] fieldFrequencies
           
 
Fields inherited from class org.terrier.structures.BasicLexiconEntry
n_t, startBitOffset, startOffset, termId, TF
 
Fields inherited from interface org.terrier.structures.BitIndexPointer
BIT_MASK, FILE_SHIFT, MAX_FILE_ID
 
Constructor Summary
BlockFieldLexiconEntry(int fieldCount)
          Constructs an instance of the class with
BlockFieldLexiconEntry(int[] _fieldFrequencies, int _blockCount)
          Construct an instance of the class with
 
Method Summary
 int getBlockCount()
          The number of blocks that this term has.
 int[] getFieldFrequencies()
          Get the frequencies for each field
 void readFields(java.io.DataInput in)
          
 void setFieldFrequencies(int[] _fieldFrequencices)
          Sets the frequencies for each field
 void write(java.io.DataOutput out)
          
 
Methods inherited from class org.terrier.structures.BasicLexiconEntry
add, getDocumentFrequency, getFileNumber, getFrequency, getNumberOfEntries, getOffset, getOffsetBits, getTermId, pointerToString, setBitIndexPointer, setFileNumber, setNumberOfEntries, setOffset, setOffset, setPointer, setStatistics, setTermId, subtract, toString
 
Methods inherited from class org.terrier.structures.LexiconEntry
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.terrier.structures.EntryStatistics
add, getDocumentFrequency, getFrequency, getTermId, subtract
 

Field Detail

fieldFrequencies

protected final int[] fieldFrequencies

blockCount

protected int blockCount
Constructor Detail

BlockFieldLexiconEntry

public BlockFieldLexiconEntry(int fieldCount)
Constructs an instance of the class with

Parameters:
fieldCount -

BlockFieldLexiconEntry

public BlockFieldLexiconEntry(int[] _fieldFrequencies,
                              int _blockCount)
Construct an instance of the class with

Parameters:
_fieldFrequencies -
_blockCount -
Method Detail

getFieldFrequencies

public int[] getFieldFrequencies()
Get the frequencies for each field

Specified by:
getFieldFrequencies in interface FieldEntryStatistics

setFieldFrequencies

public void setFieldFrequencies(int[] _fieldFrequencices)
Sets the frequencies for each field


readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Description copied from class: BasicLexiconEntry

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class BasicLexiconEntry
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Description copied from class: BasicLexiconEntry

Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class BasicLexiconEntry
Throws:
java.io.IOException

getBlockCount

public int getBlockCount()
The number of blocks that this term has. Needed by the BlockInvertedIndexBuilder.

Specified by:
getBlockCount in interface BlockEntryStatistics


Terrier 3.5. Copyright © 2004-2011 University of Glasgow