Package org.terrier.structures
Class FieldDocumentIndexEntry
- java.lang.Object
-
- org.terrier.structures.DocumentIndexEntry
-
- org.terrier.structures.BasicDocumentIndexEntry
-
- org.terrier.structures.FieldDocumentIndexEntry
-
- All Implemented Interfaces:
org.apache.hadoop.io.Writable,BitFilePosition,BitIndexPointer,Pointer
public class FieldDocumentIndexEntry extends BasicDocumentIndexEntry
A document index entry for use with fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFieldDocumentIndexEntry.FactoryFactory for creating a field document index entry
-
Field Summary
Fields Modifier and Type Field Description protected int[]fieldLengths-
Fields inherited from interface org.terrier.structures.BitIndexPointer
BIT_MASK, FILE_SHIFT, MAX_FILE_ID
-
-
Constructor Summary
Constructors Constructor Description FieldDocumentIndexEntry()Constructs an instance of the class.FieldDocumentIndexEntry(int fieldCount)Constructs an instance of the class withFieldDocumentIndexEntry(DocumentIndexEntry die)Constructs an instance of the class with
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]getFieldLengths()Get the lengths of each fieldvoidreadFields(java.io.DataInput in)voidsetFieldLengths(int[] f_lens)Set the lengths of each fieldjava.lang.StringtoString()voidwrite(java.io.DataOutput out)-
Methods inherited from class org.terrier.structures.BasicDocumentIndexEntry
pointerToString, setBitIndexPointer, setNumberOfEntries, setOffset, setPointer
-
Methods inherited from class org.terrier.structures.DocumentIndexEntry
getDocumentLength, getFileNumber, getNumberOfEntries, getOffset, getOffsetBits, setDocumentLength, setFileNumber, setOffset
-
-
-
-
Constructor Detail
-
FieldDocumentIndexEntry
public FieldDocumentIndexEntry()
Constructs an instance of the class.
-
FieldDocumentIndexEntry
public FieldDocumentIndexEntry(DocumentIndexEntry die)
Constructs an instance of the class with- Parameters:
die-
-
FieldDocumentIndexEntry
public FieldDocumentIndexEntry(int fieldCount)
Constructs an instance of the class with- Parameters:
fieldCount-
-
-
Method Detail
-
getFieldLengths
public int[] getFieldLengths()
Get the lengths of each field
-
setFieldLengths
public void setFieldLengths(int[] f_lens)
Set the lengths of each field
-
readFields
public void readFields(java.io.DataInput in) throws java.io.IOExceptionDescription copied from class:BasicDocumentIndexEntry- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Overrides:
readFieldsin classBasicDocumentIndexEntry- Throws:
java.io.IOException
-
write
public void write(java.io.DataOutput out) throws java.io.IOExceptionDescription copied from class:BasicDocumentIndexEntry- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Overrides:
writein classBasicDocumentIndexEntry- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
Description copied from class:DocumentIndexEntry- Overrides:
toStringin classDocumentIndexEntry
-
-