org.galagosearch.core.retrieval.structured
Class ExtentIterator

java.lang.Object
  extended by org.galagosearch.core.retrieval.structured.CountIterator
      extended by org.galagosearch.core.retrieval.structured.ExtentIterator
All Implemented Interfaces:
java.lang.Comparable<CountIterator>, StructuredIterator
Direct Known Subclasses:
ExtentConjunctionIterator, ExtentDisjunctionIterator, ExtentIndexReader.Iterator, NullExtentIterator, PositionIndexReader.Iterator

public abstract class ExtentIterator
extends CountIterator

This is base interface for all inverted lists that return count information. See the CountIterator class for documentation on most of these methods.

Author:
trevor

Constructor Summary
ExtentIterator()
           
 
Method Summary
abstract  int count()
          Returns the number of occurrences of this iterator's term in the current document.
abstract  int document()
          Returns the current document.
abstract  ExtentArray extents()
           
abstract  boolean isDone()
          Returns true if there is no data left in the list and false otherwise.
abstract  void nextDocument()
          Moves the iterator to the next document in the list.
abstract  void reset()
          Resets the position of this iterator to the start of the list.
 boolean skipToDocument(int document)
          Skips forward in the list until a document is found that is greater than or equal to the parameter.
 
Methods inherited from class org.galagosearch.core.retrieval.structured.CountIterator
compareTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtentIterator

public ExtentIterator()
Method Detail

nextDocument

public abstract void nextDocument()
                           throws java.io.IOException
Description copied from class: CountIterator
Moves the iterator to the next document in the list. If no such document is available, isDone() will return true after this method is called.

Specified by:
nextDocument in class CountIterator
Throws:
java.io.IOException

document

public abstract int document()
Description copied from class: CountIterator
Returns the current document.

Specified by:
document in class CountIterator

count

public abstract int count()
Description copied from class: CountIterator
Returns the number of occurrences of this iterator's term in the current document.

Specified by:
count in class CountIterator

extents

public abstract ExtentArray extents()

isDone

public abstract boolean isDone()
Description copied from class: CountIterator
Returns true if there is no data left in the list and false otherwise. If the result of this method is true, the data returned from document() and count() is meaningless.

Specified by:
isDone in class CountIterator

reset

public abstract void reset()
                    throws java.io.IOException
Description copied from class: CountIterator
Resets the position of this iterator to the start of the list.

Specified by:
reset in interface StructuredIterator
Specified by:
reset in class CountIterator
Throws:
java.io.IOException

skipToDocument

public boolean skipToDocument(int document)
                       throws java.io.IOException
Description copied from class: CountIterator
Skips forward in the list until a document is found that is greater than or equal to the parameter. If the iterator is currently pointing to a document that is greater than or equal to the parameter, nothing happens.

Overrides:
skipToDocument in class CountIterator
Returns:
true, if the iterator is now pointing at the desired document, or false otherwise.
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.