|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 java.util.Iterator<? extends BitIndexPointer> |
pointerList
the lexicon input stream providing the offsets |
protected java.lang.reflect.Constructor<? extends IterablePosting> |
postingConstructor
|
protected java.lang.Class<? extends IterablePosting> |
postingIteratorClass
|
protected java.lang.String |
structureName
|
Constructor Summary | |
---|---|
BitPostingIndexInputStream(Index _index,
java.lang.String _structureName,
java.util.Iterator<? extends BitIndexPointer> _pointerList,
java.lang.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 java.lang.String |
getFilename(Index _index,
java.lang.String structureName,
byte fileCount,
byte fileId)
Returns filename |
static java.lang.String |
getFilename(java.lang.String path,
java.lang.String prefix,
java.lang.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 java.util.Iterator<? extends BitIndexPointer> pointerList
protected BitIn file
protected java.lang.Class<? extends IterablePosting> postingIteratorClass
protected java.lang.reflect.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 java.lang.String structureName
Constructor Detail |
---|
public BitPostingIndexInputStream(Index _index, java.lang.String _structureName, java.util.Iterator<? extends BitIndexPointer> _pointerList, java.lang.Class<? extends IterablePosting> _postingIteratorClass) throws java.io.IOException
_index
- _structureName
- _pointerList
- _postingIteratorClass
-
java.io.IOException
Method Detail |
---|
public static java.lang.String getFilename(java.lang.String path, java.lang.String prefix, java.lang.String structureName, byte fileCount, byte fileId)
path
- prefix
- structureName
- fileCount
- fileId
-
public static java.lang.String getFilename(Index _index, java.lang.String structureName, byte fileCount, byte fileId)
_index
- structureName
- fileCount
- fileId
-
public BitFilePosition getPos()
public void skip(int numEntries) throws java.io.IOException
skip
in interface Skipable
numEntries
- number of entries to skip
java.io.IOException
- if an IO problem occurs.public int getNumberOfCurrentPostings()
getNumberOfCurrentPostings
in interface PostingIndexInputStream
public IterablePosting getNextPostings() throws java.io.IOException
getNextPostings
in interface PostingIndexInputStream
java.io.IOException
- if an I/O problem occurs.public boolean hasNext()
hasNext
in interface java.util.Iterator<IterablePosting>
protected BitIndexPointer _next()
public IterablePosting next()
next
in interface java.util.Iterator<IterablePosting>
public int getEntriesSkipped()
getEntriesSkipped
in interface PostingIndexInputStream
protected IterablePosting loadPostingIterator(BitIndexPointer pointer) throws java.io.IOException
java.io.IOException
protected DocumentIndex getDocumentIndex(BitIndexPointer pointer)
public void print()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
java.io.IOException
public void remove()
remove
in interface java.util.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 |