org.basex.index
Interface Index

All Known Implementing Classes:
DiskValues, FTIndex, MemValues, Names, PathSummary, Resources, UpdatableDiskValues, UpdatableMemValues

public interface Index

This interface defines the methods which have to be implemented by an index structure.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Method Summary
 void close()
          Closes the index.
 int count(IndexToken token)
          Returns the (approximate/estimated) number of hits for the specified token.
 EntryIterator entries(IndexEntries entries)
          Returns all entries that match the specified token.
 byte[] info()
          Returns information on the index structure.
 void init()
          Initializes the index.
 IndexIterator iter(IndexToken token)
          Returns an iterator for the index results.
 

Method Detail

init

void init()
Initializes the index.


info

byte[] info()
Returns information on the index structure.

Returns:
info

entries

EntryIterator entries(IndexEntries entries)
Returns all entries that match the specified token.

Parameters:
entries - index entries
Returns:
entries

iter

IndexIterator iter(IndexToken token)
Returns an iterator for the index results.

Parameters:
token - token to be found
Returns:
sorted pre values for the token

count

int count(IndexToken token)
Returns the (approximate/estimated) number of hits for the specified token.

Parameters:
token - token to be found
Returns:
number of hits

close

void close()
Closes the index.