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 class
FieldDocumentIndexEntry.Factory
Factory 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 fieldvoid
readFields(java.io.DataInput in)
void
setFieldLengths(int[] f_lens)
Set the lengths of each fieldjava.lang.String
toString()
void
write(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.IOException
Description copied from class:BasicDocumentIndexEntry
- Specified by:
readFields
in interfaceorg.apache.hadoop.io.Writable
- Overrides:
readFields
in classBasicDocumentIndexEntry
- Throws:
java.io.IOException
-
write
public void write(java.io.DataOutput out) throws java.io.IOException
Description copied from class:BasicDocumentIndexEntry
- Specified by:
write
in interfaceorg.apache.hadoop.io.Writable
- Overrides:
write
in classBasicDocumentIndexEntry
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
Description copied from class:DocumentIndexEntry
- Overrides:
toString
in classDocumentIndexEntry
-
-