org.egothor.store
Class ThickBarrelIn

java.lang.Object
  extended by org.egothor.store.ThickBarrelIn
All Implemented Interfaces:
BarrelReader

public class ThickBarrelIn
extends java.lang.Object
implements BarrelReader

The ThickBarrelIn object is a core implementation of a Barrel that has document's metadata stored in Documents class and inverted list's metadata in Terms. This object defines a Barrel that stores its inverted lists in a single file.

Author:
Leo Galambos

Field Summary
 java.lang.String location
          The directory where is the barrel stored.
protected  ProximitiesFileIn rf
           
 
Constructor Summary
protected ThickBarrelIn(java.lang.String location, Bitmap map, Documents docs, Terms terms)
           
 
Method Summary
 void close()
          Close the DB files.
 SequenceWithClose<DocumentData> getDocuments()
          Return an enumeration containing stored metadata of documents.
 SequenceWithClose<IListReader> getILists()
          Returns an enumeration of inverted lists.
 long length()
          Return the number of active (not deleted) documents.
 void rewind()
          Restart this BarrelReader so that the documents can be read again.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

location

public java.lang.String location
The directory where is the barrel stored.


rf

protected ProximitiesFileIn rf
Constructor Detail

ThickBarrelIn

protected ThickBarrelIn(java.lang.String location,
                        Bitmap map,
                        Documents docs,
                        Terms terms)
                 throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getDocuments

public SequenceWithClose<DocumentData> getDocuments()
Return an enumeration containing stored metadata of documents.

Specified by:
getDocuments in interface BarrelReader
Returns:
an Enumeration of document metadata

getILists

public SequenceWithClose<IListReader> getILists()
Returns an enumeration of inverted lists.

Specified by:
getILists in interface BarrelReader
Returns:
an Enumeration of inverted lists

length

public long length()
Return the number of active (not deleted) documents.

Specified by:
length in interface BarrelReader
Returns:
the number of active documents

close

public void close()
Close the DB files.

Specified by:
close in interface BarrelReader

rewind

public void rewind()
            throws java.io.IOException
Restart this BarrelReader so that the documents can be read again.

Specified by:
rewind in interface BarrelReader
Throws:
java.io.IOException