Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures
Class BlockDirectIndexInputStream

java.lang.Object
  extended by uk.ac.gla.terrier.structures.DirectIndexInputStream
      extended by uk.ac.gla.terrier.structures.BlockDirectIndexInputStream
All Implemented Interfaces:
Closeable, IndexConfigurable

public class BlockDirectIndexInputStream
extends DirectIndexInputStream
implements IndexConfigurable

This class reads the block field direct index structure sequentially, as an input stream.

Version:
$Revision: 1.28 $
Author:
Douglas Johnson, Vassilis Plachouras
See Also:
BlockDirectIndex

Constructor Summary
BlockDirectIndexInputStream()
          A default constructor for the class that opens the direct file and the document index file with the default names
BlockDirectIndexInputStream(java.lang.String Path, java.lang.String Prefix)
           
BlockDirectIndexInputStream(java.lang.String Path, java.lang.String Prefix, DocumentIndexInputStream diis)
           
 
Method Summary
 int[][] getNextTerms()
          Reads the next document's entry from the direct file.
 void print()
          Prints out the block field direct index file.
 void setIndex(Index i)
          let it know which index to use
 
Methods inherited from class uk.ac.gla.terrier.structures.DirectIndexInputStream
close, getDocumentsSkipped, getNextTerms, reOpenLegacyBitFile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockDirectIndexInputStream

public BlockDirectIndexInputStream()
A default constructor for the class that opens the direct file and the document index file with the default names


BlockDirectIndexInputStream

public BlockDirectIndexInputStream(java.lang.String Path,
                                   java.lang.String Prefix)

BlockDirectIndexInputStream

public BlockDirectIndexInputStream(java.lang.String Path,
                                   java.lang.String Prefix,
                                   DocumentIndexInputStream diis)
Method Detail

setIndex

public void setIndex(Index i)
let it know which index to use

Specified by:
setIndex in interface IndexConfigurable
Parameters:
i - Index object to use

print

public void print()
Prints out the block field direct index file.

Overrides:
print in class DirectIndexInputStream

getNextTerms

public int[][] getNextTerms()
                     throws java.io.IOException
Reads the next document's entry from the direct file.

Overrides:
getNextTerms in class DirectIndexInputStream
Returns:
int[][] the two dimensional array containing the term ids, block ids, and block frequencies.
Throws:
java.io.IOException - if an I/O error occurs

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow