|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.indexing.singlepass.RunIterator org.terrier.structures.indexing.singlepass.FileRunIterator<K>
K
- public class FileRunIterator<K extends PostingInRun>
Reads runs of flushed term posting lists by reading them from files.
Field Summary | |
---|---|
protected int |
currentPosting
Current Posting List number |
protected int |
maxSize
max number of pointers any term in the run |
protected BitIn |
mbis
Input stream for reading the run. |
protected int |
size
Number of postings in this run |
protected java.io.DataInputStream |
stringDIS
Input stream for reading the terms. |
Fields inherited from class org.terrier.structures.indexing.singlepass.RunIterator |
---|
flushNo, numberOfFields, posting, postingClass |
Constructor Summary | |
---|---|
FileRunIterator(java.lang.String filename,
java.lang.String termsFile,
int runNo,
java.lang.Class<? extends PostingInRun> _postingInRunClass,
int fieldCount)
Load a new run from files. |
Method Summary | |
---|---|
void |
close()
Closes the run files being processed |
boolean |
hasNext()
Are there more posting to process in this run? |
PostingInRun |
next()
Move to the next posting in this run |
java.lang.String |
readString()
Reads the String identifying a term from the underlying stream. |
int |
readTermFrequency()
Reads the term frequency for the current posting, and aligns the stream. |
Methods inherited from class org.terrier.structures.indexing.singlepass.RunIterator |
---|
createPosting, current, getRunNo, remove |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BitIn mbis
protected java.io.DataInputStream stringDIS
protected int size
protected int currentPosting
protected int maxSize
Constructor Detail |
---|
public FileRunIterator(java.lang.String filename, java.lang.String termsFile, int runNo, java.lang.Class<? extends PostingInRun> _postingInRunClass, int fieldCount) throws java.lang.Exception
filename
- the filename of the file containing the posting liststermsFile
- the filename of the file containing the term namesrunNo
- the number of this run_postingInRunClass
- the class that all postings in this class have
java.lang.Exception
Method Detail |
---|
public void close()
close
in interface java.io.Closeable
close
in class RunIterator
public boolean hasNext()
hasNext
in interface java.util.Iterator<PostingInRun>
hasNext
in class RunIterator
public PostingInRun next()
next
in interface java.util.Iterator<PostingInRun>
next
in class RunIterator
public int readTermFrequency() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public java.lang.String readString() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |