Package org.terrier.structures.postings
Class FieldORIterablePosting
- java.lang.Object
-
- org.terrier.structures.postings.IterablePostingImpl
-
- org.terrier.structures.postings.ORIterablePosting
-
- org.terrier.structures.postings.FieldORIterablePosting
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,FieldPosting
,IterablePosting
,Posting
- Direct Known Subclasses:
BlockFieldORIterablePosting
public class FieldORIterablePosting extends ORIterablePosting implements FieldPosting
ORIterablePosting implementation that implements FieldPosting- Since:
- 3.5
- Author:
- Craig Macdonald
-
-
Field Summary
-
Fields inherited from interface org.terrier.structures.postings.IterablePosting
END_OF_LIST, EOL
-
-
Constructor Summary
Constructors Constructor Description FieldORIterablePosting(IterablePosting[] ips)
Constructs an instance of FieldORIterablePosting.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPosting(Posting _p)
WritablePosting
asWritablePosting()
Copy this posting to one free of an iterator.protected void
firstPosting(Posting _p)
int[]
getFieldFrequencies()
Returns the frequencies of the term in each field of the document.int[]
getFieldLengths()
Returns the lengths of the each field in the current document.void
setFieldLengths(int[] fl)
.-
Methods inherited from class org.terrier.structures.postings.ORIterablePosting
close, endOfPostings, getDocumentLength, getFrequency, getId, mergePostings, next, next
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.terrier.structures.postings.Posting
getDocumentLength, getFrequency, getId, setId
-
-
-
-
Constructor Detail
-
FieldORIterablePosting
public FieldORIterablePosting(IterablePosting[] ips) throws java.io.IOException
Constructs an instance of FieldORIterablePosting.- Parameters:
ips
-- Throws:
java.io.IOException
-
-
Method Detail
-
getFieldFrequencies
public int[] getFieldFrequencies()
Description copied from interface:FieldPosting
Returns the frequencies of the term in each field of the document.- Specified by:
getFieldFrequencies
in interfaceFieldPosting
- Returns:
- the frequencies of the term in each field of the document.
-
getFieldLengths
public int[] getFieldLengths()
Description copied from interface:FieldPosting
Returns the lengths of the each field in the current document.- Specified by:
getFieldLengths
in interfaceFieldPosting
- Returns:
- the lengths of the each field in the current document.
-
setFieldLengths
public void setFieldLengths(int[] fl)
. This operation is unsupported.- Specified by:
setFieldLengths
in interfaceFieldPosting
-
addPosting
protected void addPosting(Posting _p)
- Overrides:
addPosting
in classORIterablePosting
-
firstPosting
protected void firstPosting(Posting _p)
- Overrides:
firstPosting
in classORIterablePosting
-
asWritablePosting
public WritablePosting asWritablePosting()
Description copied from class:ORIterablePosting
Copy this posting to one free of an iterator. Kind of like a clone.- Specified by:
asWritablePosting
in interfacePosting
- Overrides:
asWritablePosting
in classORIterablePosting
- Returns:
- an identical posting, but which can be manipulated free of this iterator
-
-