|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.terrier.structures.postings.BasicPostingImpl
public class BasicPostingImpl
Implementation of a Posting that is non-iterable.
Field Summary | |
---|---|
protected int |
dl
|
protected int |
id
id of the posting |
protected int |
tf
frequency of this posting |
Constructor Summary | |
---|---|
BasicPostingImpl()
Empty constructor - needed for Writable |
|
BasicPostingImpl(int docid,
int frequency)
Constructor that sets both id and frequency |
Method Summary | |
---|---|
WritablePosting |
asWritablePosting()
Copies this posting to one free of an iterator. |
int |
getDocumentLength()
Returns 0 |
int |
getFrequency()
Return the frequency of the term in the current document |
int |
getId()
Return the id of the current posting. |
void |
readFields(DataInput in)
Reads the a single posting (not an iterable posting - use BitPostingIndex for that) |
void |
setDocumentLength(int l)
|
void |
setId(int _id)
Set the id of this posting |
String |
toString()
Makes a human readable form of this posting |
void |
write(DataOutput out)
Writes the current posting (not an iterable posting - use DirectInvertedOutputStream for that). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int dl
protected int id
protected int tf
Constructor Detail |
---|
public BasicPostingImpl()
public BasicPostingImpl(int docid, int frequency)
Method Detail |
---|
public final int getId()
getId
in interface Posting
public final int getFrequency()
getFrequency
in interface Posting
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void setId(int _id)
setId
in interface Posting
public int getDocumentLength()
getDocumentLength
in interface Posting
public WritablePosting asWritablePosting()
asWritablePosting
in interface Posting
public String toString()
toString
in class Object
public void setDocumentLength(int l)
setDocumentLength
in interface WritablePosting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |