org.egothor.merger
Class ConcatLists

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

public abstract class ConcatLists
extends java.lang.Object
implements IListReader

A ConcatIListReader is some 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
ConcatLists()
          Constructor for the ConcatListReader object
 
Method Summary
 void close()
          Does nothing by default.
 long getPostings()
          Return the number of postings.
 java.lang.String getTerm()
          Return the term for this ConcatListReader.
 boolean next()
          Move to the next item in the inverted list.
 Proximities openProx()
          Return an access object to the proximity list.
 void setTerm(java.lang.String term)
          Sets the term attribute of the ConcatLists object
 boolean skipTo(long uid)
          Skip to the given position in the inverted list.
abstract  void switchContext()
          This method would close the current list reader, and set new values for current and current_offset attributes.
 long uid()
          Identification of the document.
 int weight()
          Calculated vector value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcatLists

public ConcatLists()
Constructor for the ConcatListReader object

Method Detail

setTerm

public void setTerm(java.lang.String term)
Sets the term attribute of the ConcatLists object

Parameters:
term - The new term value

getPostings

public long getPostings()
Return the number of postings.

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

getTerm

public java.lang.String getTerm()
Return the term for this ConcatListReader. The term is initiated in the constructor.

Specified by:
getTerm in interface IListReader
Returns:
the term

switchContext

public abstract void switchContext()
This method would close the current list reader, and set new values for current and current_offset attributes. If there is not any next list, then current must be set to null .


next

public boolean next()
Description copied from interface: IListReader
Move to the next item in the inverted list.

Specified by:
next in interface IListReader
Returns:
true if the next item exists

skipTo

public boolean skipTo(long uid)
Skip to the given position in the inverted list.

Specified by:
skipTo in interface IListReader
Parameters:
uid - the position to skip to
Returns:
Description of the Return Value

close

public void close()
Does nothing by default.

Specified by:
close in interface IListReader

openProx

public Proximities openProx()
Description copied from interface: IListItem
Return an access object to the proximity list.

Specified by:
openProx in interface IListItem
Returns:
a Proximities object

uid

public long uid()
Description copied from interface: IListItem
Identification of the document. If this value is lower than 0, then this item ought to be supposed to be invalid.

Specified by:
uid in interface IListItem

weight

public int weight()
Description copied from interface: IListItem
Calculated vector value.

Specified by:
weight in interface IListItem