org.basex.index.query
Class FTIndexIterator

java.lang.Object
  extended by org.basex.index.query.IndexIterator
      extended by org.basex.index.query.FTIndexIterator

public abstract class FTIndexIterator
extends IndexIterator

This interface provides methods for returning index results.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
static FTIndexIterator FTEMPTY
          Empty iterator.
 int toknum
          Each token in the query has a number.
 
Fields inherited from class org.basex.index.query.IndexIterator
EMPTY
 
Constructor Summary
FTIndexIterator()
           
 
Method Summary
static FTIndexIterator intersect(FTIndexIterator i1, FTIndexIterator i2, int dis)
          Merges two index array iterators.
abstract  FTMatches matches()
          Returns the next match.
 void tokenNum(byte tn)
          Sets the unique token number.
static FTIndexIterator union(FTIndexIterator i1, FTIndexIterator i2)
          Merges two index array iterators.
 
Methods inherited from class org.basex.index.query.IndexIterator
more, next, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

toknum

public int toknum
Each token in the query has a number.


FTEMPTY

public static final FTIndexIterator FTEMPTY
Empty iterator.

Constructor Detail

FTIndexIterator

public FTIndexIterator()
Method Detail

matches

public abstract FTMatches matches()
Returns the next match.

Returns:
next match

tokenNum

public void tokenNum(byte tn)
Sets the unique token number. Used for visualization.

Parameters:
tn - number of tokens

union

public static FTIndexIterator union(FTIndexIterator i1,
                                    FTIndexIterator i2)
Merges two index array iterators.

Parameters:
i1 - first index array iterator to merge
i2 - second index array iterator to merge
Returns:
IndexArrayIterator

intersect

public static FTIndexIterator intersect(FTIndexIterator i1,
                                        FTIndexIterator i2,
                                        int dis)
Merges two index array iterators.

Parameters:
i1 - first index array iterator to merge
i2 - second index array iterator to merge
dis - word distance. Ignored if 0
Returns:
IndexArrayIterator