org.basex.index
Class MemValues

java.lang.Object
  extended by org.basex.index.Index
      extended by org.basex.index.MemValues

public final class MemValues
extends Index

This class provides a main-memory access to attribute values and text contents.

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

Constructor Summary
MemValues()
           
 
Method Summary
 void close()
          Closes the index.
 IndexIterator ids(IndexToken tok)
          Returns an iterator for the index results.
 int index(byte[] key, int id)
          Indexes the specified keys and values.
 byte[] info()
          Returns information on the index structure.
 int nrIDs(IndexToken it)
          Returns the (approximate/estimated) number of ids for the specified token.
 byte[] token(int id)
          Returns the token for the specified id.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemValues

public MemValues()
Method Detail

index

public int index(byte[] key,
                 int id)
Indexes the specified keys and values.

Parameters:
key - key
id - id value
Returns:
index position

token

public byte[] token(int id)
Returns the token for the specified id.

Parameters:
id - id
Returns:
token

ids

public IndexIterator ids(IndexToken tok)
Description copied from class: Index
Returns an iterator for the index results.

Specified by:
ids in class Index
Parameters:
tok - token to be found
Returns:
ids

nrIDs

public int nrIDs(IndexToken it)
Description copied from class: Index
Returns the (approximate/estimated) number of ids for the specified token.

Specified by:
nrIDs in class Index
Parameters:
it - token to be found
Returns:
number of ids

info

public byte[] info()
Description copied from class: Index
Returns information on the index structure.

Specified by:
info in class Index
Returns:
info

close

public void close()
Description copied from class: Index
Closes the index.

Specified by:
close in class Index