org.basex.index
Class Values

java.lang.Object
  extended by org.basex.index.Values
All Implemented Interfaces:
Index

public final class Values
extends java.lang.Object
implements Index

This class provides access to 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
 
Field Summary
 int size
          Number of hash entries.
 
Constructor Summary
Values(Data d, java.lang.String db, boolean txt)
          Constructor, initializing the index structure.
 
Method Summary
 void close()
          Close the index.
 int[][] idPos(byte[] tok, FTOption ftO)
          Returns all ids from index stored for tok with respect to ftO.
 int[] ids(byte[] tok)
          Returns the (approximate) number of ids for the specified token.
 int[] ids(byte[] tok, FTOption ftO)
          Returns all ids from index stored for tok 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
 

Field Detail

size

public int size
Number of hash entries.

Constructor Detail

Values

public Values(Data d,
              java.lang.String db,
              boolean txt)
       throws java.io.IOException
Constructor, initializing the index structure.

Parameters:
d - data reference
db - name of the database
txt - value type (texts/attributes)
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 index stored for tok 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 the (approximate) number of ids for the specified 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 index stored for tok 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