Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.index
Class FTNode

    java.lang.Object
      org.basex.index.FTNode

    public final class FTNode

extends java.lang.Object

XPath Value representing a full-text Node.

Author:
  Workgroup DBIS, University of Konstanz 2005-08, ISC License, Sebastian Gath

Field Summary
`boolean` | `not` Flag for negative node.
`IntList` | `p` Pointer for idpos - each idpos has a pointer at its search string position in the xpath query.
`int` | `size` Number of stored values..

Constructor Summary
`FTNode()` Constructor.
`FTNode(int[] idpos, int[] pointer)` Constructor.

Method Summary
`IntList[]` | `convertPos()` Converts the pos values in the following style.
`void` | `genPointer(int v)` Generates pointer with value v.
`int[]` | `getFTNode()` Returns the complete ftnode.
`int` | `getNumTokens()` Get number of tokens from query for this node.
`int` | `getPre()` Getter for the prevalue.
`FTTokenizer[]` | `getToken()` Getter for the FTTokenizer.
`byte[]` | `getTokens()` Convert all tokens to one byte[].
`boolean` | `hasPos()` Checks if node has position values.
`boolean` | `merge(FTNode n, int w)` Merges n to the current FTNode.
`boolean` | `morePos()` Test is any pos value is remaining.
`int` | `nextPoi()` Get next pointer.
`int` | `nextPos()` Get next pos value.
`void` | `removePos()` Removes current position value.
`void` | `reset()` Reset position iterator.
`void` | `setToken(FTTokenizer[] token)` Setter for FTTokenizer.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### p

    public IntList p

  Pointer for idpos - each idpos has a pointer at its search string position in the xpath query. poi[0] = max. max pointer value in poi

### not

    public boolean not

  Flag for negative node.

### size

    public int size

  Number of stored values..

Constructor Detail

### FTNode

    public FTNode()

  Constructor.

### FTNode

    public FTNode(int[] idpos,
                  int[] pointer)

  Constructor.

  Parameters:
    `idpos` - ftdata, pre, pos1, ..., posn
    `pointer` - pointer on query tokens

Method Detail

### genPointer

    public void genPointer(int v)

  Generates pointer with value v.

  Parameters:
    `v` - value

### getPre

    public int getPre()

  Getter for the prevalue.

  Returns:
    pre value

### morePos

    public boolean morePos()

  Test is any pos value is remaining.

  Returns:
    boolean

### reset

    public void reset()

  Reset position iterator.

### setToken

    public void setToken(FTTokenizer[] token)

  Setter for FTTokenizer.

  Parameters:
    `token` - FTTokenizer

### getToken

    public FTTokenizer[] getToken()

  Getter for the FTTokenizer.

  Returns:
    FTTokenizer

### getTokens

    public byte[] getTokens()

  Convert all tokens to one byte[].

  Returns:
    byte[] tokens

### nextPos

    public int nextPos()

  Get next pos value.

  Returns:
    pos value

### removePos

    public void removePos()

  Removes current position value.

### hasPos

    public boolean hasPos()

  Checks if node has position values.

  Returns:
    boolean has position values

### getNumTokens

    public int getNumTokens()

  Get number of tokens from query for this node.

  Returns:
    number of tokens

### merge

    public boolean merge(FTNode n,
                         int w)

  Merges n to the current FTNode. Pointer are node updated.

  Parameters:
    `n` - ftnode to be merged
    `w` - distance between the pos values
  Returns:
    boolean

### convertPos

    public IntList[] convertPos()

  Converts the pos values in the following style. [poi0]: pos0, ..., posk [poi1]: pos0, ..., posj

  Returns:
    IntList[]

### nextPoi

    public int nextPoi()

  Get next pointer.

  Returns:
    next pointer

### getFTNode

    public int[] getFTNode()

  Returns the complete ftnode.

  Returns:
    current ftnode

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD