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 Names

    java.lang.Object
      org.basex.util.TokenSet
          org.basex.index.Names

    public final class Names

extends TokenSet

This class indexes and organizes the tags or attribute names, used in an XML document.

Author:
  Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen, Lukas Kircher

Field Summary
`int` | `tn` total number of entries.

Constructor Summary
`Names()` Default constructor.
`Names(DataInput in)` Constructor, specifying an input file.

Method Summary
`int` | `index(byte[] k, byte[] v, boolean st)` Indexes a name and returns its unique id.
`void` | `index(int i, byte[] v)` Evaluates the value for the specified key id.
`byte[]` | `info()` Returns index information.
`void` | `init()` Initializes the statistics.
`StatsKey` | `stat(int id)` Returns the statistics for the specified key id.
`void` | `write(DataOutput out)` Writes the token set to the specified output.

Methods inherited from class org.basex.util.TokenSet
`add, delete, id, key, keys, read, size`

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

Field Detail

### tn

    public int tn

  total number of entries.

Constructor Detail

### Names

    public Names()

  Default constructor.

### Names

    public Names(DataInput in)
          throws IOException

  Constructor, specifying an input file.

  Parameters:
    `in` - input stream
  Throws:
    `IOException` - I/O exception

Method Detail

### init

    public void init()

  Initializes the statistics.

### index

    public int index(byte[] k,
                     byte[] v,
                     boolean st)

  Indexes a name and returns its unique id.

  Parameters:
    `k` - name to be found
    `v` - value, evaluated in statistics
    `st` - statistics flag
  Returns:
    name id

### index

    public void index(int i,
                      byte[] v)

  Evaluates the value for the specified key id.

  Parameters:
    `i` - key id
    `v` - value, used for statistics

### write

    public void write(DataOutput out)
               throws IOException

  Description copied from class: `TokenSet`
  Writes the token set to the specified output.

  Overrides:
    `write` in class `TokenSet`
  Parameters:
    `out` - output stream
  Throws:
    `IOException` - I/O exception

### stat

    public StatsKey stat(int id)

  Returns the statistics for the specified key id.

  Parameters:
    `id` - id
  Returns:
    statistics

### info

    public byte[] info()

  Returns index information.

  Returns:
    statistics string

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