org.terrier.structures.postings
Class TermPayloadPostingImpl<PAYLOAD>

java.lang.Object
  extended by org.terrier.structures.postings.BasicPostingImpl
      extended by 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

Field Summary
protected  TermPayloadCoordinator<PAYLOAD> payloadConf
          This stores info about the payload
 
Fields inherited from class org.terrier.structures.postings.BasicPostingImpl
id, tf
 
Constructor Summary
TermPayloadPostingImpl(int docid, int frequency, PAYLOAD[] _positions, TermPayloadCoordinator<PAYLOAD> payloadConf)
           
 
Method Summary
 org.terrier.structures.postings.WritablePosting asWritablePosting()
           
 PAYLOAD[] getPayloads()
          Get payloads of occurrences
 void readFields(DataInput in)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class org.terrier.structures.postings.BasicPostingImpl
getDocumentLength, getFrequency, getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.terrier.structures.postings.Posting
getDocumentLength, getFrequency, getId, setId
 

Field Detail

payloadConf

protected TermPayloadCoordinator<PAYLOAD> payloadConf
This stores info about the payload

Constructor Detail

TermPayloadPostingImpl

public TermPayloadPostingImpl(int docid,
                              int frequency,
                              PAYLOAD[] _positions,
                              TermPayloadCoordinator<PAYLOAD> payloadConf)
Parameters:
docid -
frequency -
_positions -
payloadConf -
Method Detail

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.