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

## org.basex.index
Class Words

    java.lang.Object
      org.basex.index.Words

All Implemented Interfaces:
  Index

    public final class Words

extends java.lang.Object
implements Index

This class provides access to words of attribute values and text contents stored on disk.

Author:
  Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Nested Class Summary

Nested classes/interfaces inherited from interface org.basex.index.Index
`Index.TYPE`

Constructor Summary
`Words(java.lang.String db)` Constructor, specifying a filename.

Method Summary
`void` | `close()` Close the index.
`int[][]` | `idPos(byte[] tok, FTOption ftO)` Returns all ids from trie stored for token with respect to ftO.
`int[]` | `ids(byte[] tok)` Returns all ids from index stored for token.
`int[]` | `ids(byte[] tok, FTOption ftO)` Returns all ids from trie stored for token with respect to ftO.
`void` | `info(PrintOutput out)` Returns information on the index structure.
`int` | `nrIDs(byte[] tok)` Returns the decompressed ids for the specified token.

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

Constructor Detail

### Words

    public Words(java.lang.String db)
          throws java.io.IOException

  Constructor, specifying a filename.

  Parameters:
    `db` - name of the database
  Throws:
    `java.io.IOException` - IO Exception

Method Detail

### close

    public void close()
               throws java.io.IOException

  Close the index.

  Specified by:
    `close` in interface `Index`
  Throws:
    `java.io.IOException` - in case of write errors

### idPos

    public int[][] idPos(byte[] tok,
                         FTOption ftO)

  Returns all ids from trie stored for token with respect to ftO.

  Specified by:
    `idPos` in interface `Index`
  Parameters:
    `tok` - token to be found
    `ftO` - FTOption for tok
  Returns:
    number of ids

### ids

    public int[] ids(byte[] tok)

  Returns all ids from index stored for token.

  Specified by:
    `ids` in interface `Index`
  Parameters:
    `tok` - token to be found
  Returns:
    number of ids

### ids

    public int[] ids(byte[] tok,
                     FTOption ftO)

  Returns all ids from trie stored for token with respect to ftO.

  Specified by:
    `ids` in interface `Index`
  Parameters:
    `tok` - token to be found
    `ftO` - FTOption for tok
  Returns:
    number of ids

### info

    public void info(PrintOutput out)
              throws java.io.IOException

  Returns information on the index structure.

  Specified by:
    `info` in interface `Index`
  Parameters:
    `out` - output stream
  Throws:
    `java.io.IOException` - in case of write errors

### nrIDs

    public int nrIDs(byte[] tok)

  Returns the decompressed ids for the specified token.

  Specified by:
    `nrIDs` in interface `Index`
  Parameters:
    `tok` - token to be found
  Returns:
    ids

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