|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.structures.indexing.singlepass.RunIterator uk.ac.gla.terrier.structures.indexing.singlepass.FileRunIterator<K>
public class FileRunIterator<K extends PostingInRun>
Reads runs of flushed term posting lists by reading them from files.
Constructor Summary | |
---|---|
FileRunIterator(java.lang.String filename,
java.lang.String termsFile,
int runNo,
java.lang.Class<? extends PostingInRun> _postingInRunClass)
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 uk.ac.gla.terrier.structures.indexing.singlepass.RunIterator |
---|
current, getRunNo, remove |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileRunIterator(java.lang.String filename, java.lang.String termsFile, int runNo, java.lang.Class<? extends PostingInRun> _postingInRunClass) 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 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.
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |