gate.creole.annic.apache.lucene.index
Class SegmentTermDocs

java.lang.Object
  extended by gate.creole.annic.apache.lucene.index.SegmentTermDocs
All Implemented Interfaces:
TermDocs
Direct Known Subclasses:
SegmentTermPositions

 class SegmentTermDocs
extends Object
implements TermDocs


Field Summary
private  int count
           
private  BitVector deletedDocs
           
private  int df
           
(package private)  int doc
           
(package private)  int freq
           
private  long freqPointer
           
private  InputStream freqStream
           
private  boolean haveSkipped
           
private  int numSkips
           
protected  SegmentReader parent
           
private  long proxPointer
           
private  int skipCount
           
private  int skipDoc
           
private  int skipInterval
           
private  long skipPointer
           
private  InputStream skipStream
           
 
Constructor Summary
SegmentTermDocs(SegmentReader parent)
           
 
Method Summary
 void close()
          Frees associated resources.
 int doc()
          Returns the current document number.
 int freq()
          Returns the frequency of the term within the current document.
 boolean next()
          Moves to the next pair in the enumeration.
 int read(int[] docs, int[] freqs)
          Optimized implementation.
 void seek(Term term)
          Sets this to the data for a term.
 void seek(TermEnum termEnum)
          Sets this to the data for the current term in a TermEnum.
(package private)  void seek(TermInfo ti)
           
protected  void skippingDoc()
           
protected  void skipProx(long proxPointer)
          Overridden by SegmentTermPositions to skip in prox stream.
 boolean skipTo(int target)
          Optimized implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected SegmentReader parent

freqStream

private InputStream freqStream

count

private int count

df

private int df

deletedDocs

private BitVector deletedDocs

doc

int doc

freq

int freq

skipInterval

private int skipInterval

numSkips

private int numSkips

skipCount

private int skipCount

skipStream

private InputStream skipStream

skipDoc

private int skipDoc

freqPointer

private long freqPointer

proxPointer

private long proxPointer

skipPointer

private long skipPointer

haveSkipped

private boolean haveSkipped
Constructor Detail

SegmentTermDocs

SegmentTermDocs(SegmentReader parent)
          throws IOException
Throws:
IOException
Method Detail

seek

public void seek(Term term)
          throws IOException
Description copied from interface: TermDocs
Sets this to the data for a term. The enumeration is reset to the start of the data for this term.

Specified by:
seek in interface TermDocs
Throws:
IOException

seek

public void seek(TermEnum termEnum)
          throws IOException
Description copied from interface: TermDocs
Sets this to the data for the current term in a TermEnum. This may be optimized in some implementations.

Specified by:
seek in interface TermDocs
Throws:
IOException

seek

void seek(TermInfo ti)
    throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: TermDocs
Frees associated resources.

Specified by:
close in interface TermDocs
Throws:
IOException

doc

public final int doc()
Description copied from interface: TermDocs
Returns the current document number.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
doc in interface TermDocs

freq

public final int freq()
Description copied from interface: TermDocs
Returns the frequency of the term within the current document.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
freq in interface TermDocs

skippingDoc

protected void skippingDoc()
                    throws IOException
Throws:
IOException

next

public boolean next()
             throws IOException
Description copied from interface: TermDocs
Moves to the next pair in the enumeration.

Returns true iff there is such a next pair in the enumeration.

Specified by:
next in interface TermDocs
Throws:
IOException

read

public int read(int[] docs,
                int[] freqs)
         throws IOException
Optimized implementation.

Specified by:
read in interface TermDocs
Throws:
IOException

skipProx

protected void skipProx(long proxPointer)
                 throws IOException
Overridden by SegmentTermPositions to skip in prox stream.

Throws:
IOException

skipTo

public boolean skipTo(int target)
               throws IOException
Optimized implementation.

Specified by:
skipTo in interface TermDocs
Throws:
IOException