org.egothor.merger
Class ConcatListReader

java.lang.Object
  extended by org.egothor.merger.ConcatLists
      extended by org.egothor.merger.ConcatListReader
All Implemented Interfaces:
IListItem, IListReader

public class ConcatListReader
extends ConcatLists

A ConcatIListReader is a collection (array) of IListReaders. Essentially, this is an array of inverted lists. This class can be implemented as sub-class of ConcatEnums, but we have not got the IListReaders to Enumerations, so it must wait.

Author:
Leo Galambos

Constructor Summary
ConcatListReader(int max_len, java.lang.String term)
          Constructor for the ConcatListReader object
 
Method Summary
 void add(long off, IListReader ilr)
          Add the given inverted list at the given position in this ConcatListReader.
 void close()
          Close the IListReaders and mark for garbage collection.
 IListItem cursor()
           
 long getPostings()
          Return the number of postings.
 void switchContext()
          Description of the Method
 
Methods inherited from class org.egothor.merger.ConcatLists
getTerm, next, openProx, setTerm, skipTo, uid, weight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcatListReader

public ConcatListReader(int max_len,
                        java.lang.String term)
Constructor for the ConcatListReader object

Parameters:
max_len - the initial length
term - the term
Method Detail

getPostings

public long getPostings()
Return the number of postings.

Specified by:
getPostings in interface IListReader
Overrides:
getPostings in class ConcatLists
Returns:
the number of postings

add

public void add(long off,
                IListReader ilr)
Add the given inverted list at the given position in this ConcatListReader.

Parameters:
off - where to add
ilr - the inverted list to add

switchContext

public void switchContext()
Description of the Method

Specified by:
switchContext in class ConcatLists

cursor

public IListItem cursor()

close

public void close()
Close the IListReaders and mark for garbage collection.

Specified by:
close in interface IListReader
Overrides:
close in class ConcatLists