org.egothor.core
Class IListRemapper

java.lang.Object
  extended by org.egothor.core.IListShadow
      extended by org.egothor.core.IListRemapper
All Implemented Interfaces:
IListItem, IListReader

public abstract class IListRemapper
extends IListShadow

This object remaps the document uids to new values in the inverted list. This action is offered to a barrel that has many removed documents.

The final inverted list that Remapper generates is a list that would exist if the barrel did not contain any removed documents and the first document had uid=0.

Author:
Leo Galambos

Constructor Summary
IListRemapper(IListReader orig)
          Constructor for the Remapper object.
 
Method Summary
 boolean next()
          Get a next item of an inverted list and remap it.
abstract  boolean removed(long uid)
          Test whether the specified document has been removed.
 boolean skipTo(long uid)
          This method is not supported.
 long uid()
          Identification of the document.
 
Methods inherited from class org.egothor.core.IListShadow
close, getPostings, getTerm, openProx, setSource, weight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IListRemapper

public IListRemapper(IListReader orig)
Constructor for the Remapper object.

Parameters:
orig - the IListReader used by this object to read inverted lists
Method Detail

skipTo

public boolean skipTo(long uid)
This method is not supported.

Specified by:
skipTo in interface IListReader
Overrides:
skipTo in class IListShadow
Parameters:
uid - parameter
Returns:
item

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
Overrides:
uid in class IListShadow

next

public boolean next()
Get a next item of an inverted list and remap it.

Specified by:
next in interface IListReader
Overrides:
next in class IListShadow
Returns:
item

removed

public abstract boolean removed(long uid)
Test whether the specified document has been removed. If it was, it would caused some shift in the numbering (covered by IListRemapper object).

Parameters:
uid - the document in question
Returns:
true if document has been removed, false otherwise