|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.terrier.structures.BitPostingIndexInputStream
public class BitPostingIndexInputStream
Input stream for a bit posting index.
Field Summary | |
---|---|
protected int |
currentEntryCount
|
protected byte |
currentFile
|
protected BitIndexPointer |
currentPointer
|
protected DocumentIndex |
doi
|
protected int |
entriesSkipped
|
protected int |
fieldCount
|
protected BitIn |
file
The gamma compressed file containing the terms. |
protected byte |
fileCount
|
protected Index |
index
|
protected static org.apache.log4j.Logger |
logger
|
protected Iterator<? extends BitIndexPointer> |
pointerList
the lexicon input stream providing the offsets |
protected Constructor<? extends IterablePosting> |
postingConstructor
|
protected Class<? extends IterablePosting> |
postingIteratorClass
|
protected String |
structureName
|
Constructor Summary | |
---|---|
BitPostingIndexInputStream(Index _index,
String _structureName,
Iterator<? extends BitIndexPointer> _pointerList,
Class<? extends IterablePosting> _postingIteratorClass)
Constructs an instance of BitPostingIndexInputStream. |
Method Summary | |
---|---|
protected BitIndexPointer |
_next()
|
void |
close()
|
Pointer |
getCurrentPointer()
Returns the pointer associated with the current postings being accessed |
protected DocumentIndex |
getDocumentIndex(BitIndexPointer pointer)
|
int |
getEntriesSkipped()
Returns the number of entries that were skipped during a call to the next(). |
static String |
getFilename(Index _index,
String structureName,
byte fileCount,
byte fileId)
Returns filename |
static String |
getFilename(String path,
String prefix,
String structureName,
byte fileCount,
byte fileId)
Return filename |
IterablePosting |
getNextPostings()
Return the next IterablePosting object, or null if none defined. |
int |
getNumberOfCurrentPostings()
Returns the number of postings in the current IterablePosting object |
BitFilePosition |
getPos()
Get the file position |
boolean |
hasNext()
|
protected IterablePosting |
loadPostingIterator(BitIndexPointer pointer)
|
IterablePosting |
next()
|
void |
print()
Print a list of the postings to standard out |
void |
remove()
Not supported |
void |
skip(int numEntries)
Skip forward the specified number of entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
protected final Iterator<? extends BitIndexPointer> pointerList
protected BitIn file
protected Class<? extends IterablePosting> postingIteratorClass
protected Constructor<? extends IterablePosting> postingConstructor
protected int currentEntryCount
protected BitIndexPointer currentPointer
protected int fieldCount
protected int entriesSkipped
protected byte fileCount
protected byte currentFile
protected Index index
protected DocumentIndex doi
protected String structureName
Constructor Detail |
---|
public BitPostingIndexInputStream(Index _index, String _structureName, Iterator<? extends BitIndexPointer> _pointerList, Class<? extends IterablePosting> _postingIteratorClass) throws IOException
_index
- _structureName
- _pointerList
- _postingIteratorClass
-
IOException
Method Detail |
---|
public static String getFilename(String path, String prefix, String structureName, byte fileCount, byte fileId)
path
- prefix
- structureName
- fileCount
- fileId
-
public static String getFilename(Index _index, String structureName, byte fileCount, byte fileId)
_index
- structureName
- fileCount
- fileId
-
public BitFilePosition getPos()
public void skip(int numEntries) throws IOException
skip
in interface Skipable
numEntries
- number of entries to skip
IOException
- if an IO problem occurs.public int getNumberOfCurrentPostings()
getNumberOfCurrentPostings
in interface PostingIndexInputStream
public IterablePosting getNextPostings() throws IOException
getNextPostings
in interface PostingIndexInputStream
IOException
- if an I/O problem occurs.public boolean hasNext()
hasNext
in interface Iterator<IterablePosting>
protected BitIndexPointer _next()
public IterablePosting next()
next
in interface Iterator<IterablePosting>
public int getEntriesSkipped()
getEntriesSkipped
in interface PostingIndexInputStream
protected IterablePosting loadPostingIterator(BitIndexPointer pointer) throws IOException
IOException
protected DocumentIndex getDocumentIndex(BitIndexPointer pointer)
public void print()
public void close() throws IOException
close
in interface Closeable
IOException
public void remove()
remove
in interface Iterator<IterablePosting>
public Pointer getCurrentPointer()
getCurrentPointer
in interface PostingIndexInputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |