org.terrier.structures.postings
Class TermPayloadPostingImpl<PAYLOAD>
java.lang.Object
org.terrier.structures.postings.BasicPostingImpl
org.terrier.structures.postings.TermPayloadPostingImpl<PAYLOAD>
- Type Parameters:
PAYLOAD - the payload type
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable, org.terrier.structures.postings.Posting, TermPayloadPosting<PAYLOAD>, org.terrier.structures.postings.WritablePosting
public class TermPayloadPostingImpl<PAYLOAD>
- extends org.terrier.structures.postings.BasicPostingImpl
- implements TermPayloadPosting<PAYLOAD>
A posting holding payloads
- Author:
- Jonathon Hare
| Fields inherited from class org.terrier.structures.postings.BasicPostingImpl |
id, tf |
| Methods inherited from class org.terrier.structures.postings.BasicPostingImpl |
getDocumentLength, getFrequency, getId, setId |
| Methods inherited from interface org.terrier.structures.postings.Posting |
getDocumentLength, getFrequency, getId, setId |
payloadConf
protected TermPayloadCoordinator<PAYLOAD> payloadConf
- This stores info about the payload
TermPayloadPostingImpl
public TermPayloadPostingImpl(int docid,
int frequency,
PAYLOAD[] _positions,
TermPayloadCoordinator<PAYLOAD> payloadConf)
- Parameters:
docid - frequency - _positions - payloadConf -
getPayloads
public PAYLOAD[] getPayloads()
- Description copied from interface:
TermPayloadPosting
- Get payloads of occurrences
- Specified by:
getPayloads in interface TermPayloadPosting<PAYLOAD>
- Returns:
- an array of payloads corresponding to the posting.
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields in interface org.apache.hadoop.io.Writable- Overrides:
readFields in class org.terrier.structures.postings.BasicPostingImpl
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write in interface org.apache.hadoop.io.Writable- Overrides:
write in class org.terrier.structures.postings.BasicPostingImpl
- Throws:
IOException
asWritablePosting
public org.terrier.structures.postings.WritablePosting asWritablePosting()
- Specified by:
asWritablePosting in interface org.terrier.structures.postings.Posting- Overrides:
asWritablePosting in class org.terrier.structures.postings.BasicPostingImpl
toString
public String toString()
- Overrides:
toString in class org.terrier.structures.postings.BasicPostingImpl
Copyright © 2011 The University of Southampton. All Rights Reserved.