org.terrier.structures
Class TermPayloadInvertedIndexInputStream<PAYLOAD>

java.lang.Object
  extended by org.terrier.structures.BitPostingIndexInputStream
      extended by org.terrier.structures.InvertedIndexInputStream
          extended by org.terrier.structures.TermPayloadInvertedIndexInputStream<PAYLOAD>
Type Parameters:
PAYLOAD - the type of payload
All Implemented Interfaces:
Closeable, Iterator<org.terrier.structures.postings.IterablePosting>, org.terrier.structures.IndexConfigurable, org.terrier.structures.PostingIndexInputStream, org.terrier.structures.Skipable

public class TermPayloadInvertedIndexInputStream<PAYLOAD>
extends org.terrier.structures.InvertedIndexInputStream
implements org.terrier.structures.IndexConfigurable

Reads an InvertedIndex containing payload information as a stream

Author:
Jonathon Hare

Field Summary
protected  int DocumentBlockCountDelta
           
protected  TermPayloadCoordinator<PAYLOAD> payloadConf
           
 
Fields inherited from class org.terrier.structures.BitPostingIndexInputStream
currentEntryCount, currentFile, currentPointer, entriesSkipped, fieldCount, file, fileCount, index, logger, pointerList, postingIteratorClass, structureName
 
Constructor Summary
TermPayloadInvertedIndexInputStream(org.terrier.structures.Index index, String structureName, Class<? extends org.terrier.structures.postings.IterablePosting> postingIteratorClass)
          Construct the stream
TermPayloadInvertedIndexInputStream(org.terrier.structures.Index index, String structureName, Iterator<? extends org.terrier.structures.Pointer> lexInputStream, Class<? extends org.terrier.structures.postings.IterablePosting> postingIteratorClass)
          Construct the stream
 
Method Summary
protected  int[][] getNextDocuments(org.terrier.structures.BitIndexPointer pointer)
           
protected  org.terrier.structures.postings.IterablePosting loadPostingIterator(org.terrier.structures.BitIndexPointer pointer)
           
 void print()
           
 void setIndex(org.terrier.structures.Index i)
          let it know which index to use
 
Methods inherited from class org.terrier.structures.InvertedIndexInputStream
getNextDocuments
 
Methods inherited from class org.terrier.structures.BitPostingIndexInputStream
_next, close, getCurrentPointer, getEntriesSkipped, getFilename, getFilename, getNextPostings, getNumberOfCurrentPostings, getPos, hasNext, next, remove, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DocumentBlockCountDelta

protected int DocumentBlockCountDelta

payloadConf

protected TermPayloadCoordinator<PAYLOAD> payloadConf
Constructor Detail

TermPayloadInvertedIndexInputStream

public TermPayloadInvertedIndexInputStream(org.terrier.structures.Index index,
                                           String structureName,
                                           Class<? extends org.terrier.structures.postings.IterablePosting> postingIteratorClass)
                                    throws IOException
Construct the stream

Parameters:
index - the parent index
structureName - the name of the inverted index
postingIteratorClass - the type of posting iterator
Throws:
IOException

TermPayloadInvertedIndexInputStream

public TermPayloadInvertedIndexInputStream(org.terrier.structures.Index index,
                                           String structureName,
                                           Iterator<? extends org.terrier.structures.Pointer> lexInputStream,
                                           Class<? extends org.terrier.structures.postings.IterablePosting> postingIteratorClass)
                                    throws IOException
Construct the stream

Parameters:
index - the parent index
structureName - the name of the inverted index
lexInputStream - input stream for the lexicon
postingIteratorClass - the type of posting iterator
Throws:
IOException
Method Detail

setIndex

public void setIndex(org.terrier.structures.Index i)
let it know which index to use

Specified by:
setIndex in interface org.terrier.structures.IndexConfigurable

loadPostingIterator

protected org.terrier.structures.postings.IterablePosting loadPostingIterator(org.terrier.structures.BitIndexPointer pointer)
                                                                       throws IOException
Overrides:
loadPostingIterator in class org.terrier.structures.BitPostingIndexInputStream
Throws:
IOException

getNextDocuments

protected int[][] getNextDocuments(org.terrier.structures.BitIndexPointer pointer)
                            throws IOException
Overrides:
getNextDocuments in class org.terrier.structures.InvertedIndexInputStream
Throws:
IOException

print

public void print()
Overrides:
print in class org.terrier.structures.BitPostingIndexInputStream


Copyright © 2011 The University of Southampton. All Rights Reserved.