org.egothor.store
Class IListMetadataRead

java.lang.Object
  extended by org.egothor.store.IListMetadata
      extended by org.egothor.store.IListMetadataRead
All Implemented Interfaces:
IListItem, IListMetadata, IListReader, Proximities

public class IListMetadataRead
extends IListMetadata
implements IListReader, Proximities


Field Summary
 
Fields inherited from class org.egothor.store.IListMetadata
term
 
Constructor Summary
  IListMetadataRead(DataInput in)
           
protected IListMetadataRead(IListMetadataRead orig)
          This constructor only compensates for clone() implementation.
 
Method Summary
 void close()
          Close the reader.
 void closeProx()
          Close this list and release resources.
 IListReader getNew(DataInputStream ils_dta, ProximitiesFileIn prox, boolean closeable)
           
 long getPostings()
          Return the number of items in the inverted list this object reads (including removed ones).
 java.lang.String getTerm()
          Return the term that owns this inverted list.
 int leftProx()
          Return the number of items in the proximity list which were not read yet.
 boolean next()
          Move to the next item in the inverted list.
 Proximities openProx()
          Return an access object to the proximity list.
 int readProx()
          Read this object's inverted list.
 int readProx(int[] prox, int offset, int len)
          Read an inverted list of length greater than 1.
 boolean skipTo(long uid)
          Skips (forward) in the inverted list to the first item with an ID greater than or equal to the given uid identification.
 long uid()
          Identification of the document.
 int weight()
          Calculated vector value.
 
Methods inherited from class org.egothor.store.IListMetadata
getLength, isBitmap, isSeparated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IListMetadataRead

public IListMetadataRead(DataInput in)
                  throws java.io.IOException
Throws:
java.io.IOException

IListMetadataRead

protected IListMetadataRead(IListMetadataRead orig)
This constructor only compensates for clone() implementation.

Method Detail

getNew

public IListReader getNew(DataInputStream ils_dta,
                          ProximitiesFileIn prox,
                          boolean closeable)
                   throws java.io.IOException
Throws:
java.io.IOException

getTerm

public java.lang.String getTerm()
Description copied from interface: IListReader
Return the term that owns this inverted list.

Specified by:
getTerm in interface IListReader
Returns:
the term

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)
Description copied from interface: IListReader
Skips (forward) in the inverted list to the first item with an ID greater than or equal to the given uid identification.

Specified by:
skipTo in interface IListReader
Parameters:
uid - the item to skip to
Returns:
true if the next item exists

close

public void close()
Description copied from interface: IListReader
Close the reader.

Specified by:
close in interface IListReader

getPostings

public long getPostings()
Description copied from interface: IListReader
Return the number of items in the inverted list this object reads (including removed ones).

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

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

readProx

public int readProx()
             throws java.io.IOException
Description copied from interface: Proximities
Read this object's inverted list.

Specified by:
readProx in interface Proximities
Returns:
the position of the item read
Throws:
java.io.IOException

leftProx

public int leftProx()
Description copied from interface: Proximities
Return the number of items in the proximity list which were not read yet.

Specified by:
leftProx in interface Proximities
Returns:
the number of items

closeProx

public void closeProx()
Description copied from interface: Proximities
Close this list and release resources.

Specified by:
closeProx in interface Proximities

readProx

public int readProx(int[] prox,
                    int offset,
                    int len)
             throws java.io.IOException
Description copied from interface: Proximities
Read an inverted list of length greater than 1. The list will be read in blocks of the specified size.

Specified by:
readProx in interface Proximities
Parameters:
prox - the buffer
offset - first cell to fill
len - how many cell are read
Returns:
how many cells were read
Throws:
java.io.IOException