org.egothor.core
Interface Proximities

All Known Implementing Classes:
IListMetadataRead, MemoryIList, ProximitiesFileIn

public interface Proximities

This abstract class should be extended by any class that allows the reading of a proximity list of a term in a document. That list uses A-Z order for its elements.

Author:
Leo Galambos

Method Summary
 void closeProx()
          Close this list and release resources.
 int leftProx()
          Return the number of items in the proximity list which were not read yet.
 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.
 

Method Detail

readProx

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

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

readProx

int readProx()
             throws java.io.IOException
Read this object's inverted list.

Returns:
the position of the item read
Throws:
java.io.IOException

leftProx

int leftProx()
Return the number of items in the proximity list which were not read yet.

Returns:
the number of items

closeProx

void closeProx()
Close this list and release resources.