org.basex.index
Class WordsCTA

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

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

This class indexes text contents in a compressed trie on disk.

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.basex.index.Index
Index.TYPE
 
Field Summary
 int nrIds
          last/current number of ids.
 int size
          Number of hash entries.
 
Constructor Summary
WordsCTA(java.lang.String db, DiskData d)
          Constructor, initializing the index structure.
 
Method Summary
 void close()
          Close the index.
 int[][] idPos(byte[] tok, FTOption ftO)
          Returns all ids from trie stored for tok, with repsect to ftO.
 int[] ids(byte[] tok)
          Returns all ids from trie stored for token.
 int[] ids(byte[] tok, FTOption ftO)
          Returns all ids from trie stored for tok, with repsect 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

nrIds

public int nrIds
last/current number of ids.


size

public int size
Number of hash entries.

Constructor Detail

WordsCTA

public WordsCTA(java.lang.String db,
                DiskData d)
         throws java.io.IOException
Constructor, initializing the index structure.

Parameters:
db - name of the database
d - disk data reference
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 tok, with repsect 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 trie 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 tok, with repsect 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