org.basex.index.value
Class UpdatableDiskValues

java.lang.Object
  extended by org.basex.index.value.DiskValues
      extended by org.basex.index.value.UpdatableDiskValues
All Implemented Interfaces:
Index

public final class UpdatableDiskValues
extends DiskValues

This class provides access to attribute values and text contents stored on disk. The data structure is described in the ValueIndexBuilder class.

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

Field Summary
 
Fields inherited from class org.basex.index.value.DiskValues
cache, ctext, data, idxl, idxr, monitor, size, text
 
Constructor Summary
UpdatableDiskValues(Data d, boolean txt)
          Constructor, initializing the index structure.
 
Method Summary
 void delete(TokenObjMap<IntList> m)
          Delete records from the index.
 void flush()
          Flushes the buffered data.
 void index(TokenObjMap<IntList> m)
          Add entries to the index.
protected  int pre(int id)
          Returns the pre value for the specified id.
 void replace(byte[] o, byte[] n, int id)
          Remove record from the index.
 
Methods inherited from class org.basex.index.value.DiskValues
close, count, entries, get, get, idRange, info, init, iter, iter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdatableDiskValues

public UpdatableDiskValues(Data d,
                           boolean txt)
                    throws java.io.IOException
Constructor, initializing the index structure.

Parameters:
d - data reference
txt - value type (texts/attributes)
Throws:
java.io.IOException - I/O Exception
Method Detail

pre

protected int pre(int id)
Description copied from class: DiskValues
Returns the pre value for the specified id.

Overrides:
pre in class DiskValues
Parameters:
id - id value
Returns:
pre value

flush

public void flush()
Description copied from class: DiskValues
Flushes the buffered data.

Overrides:
flush in class DiskValues

index

public void index(TokenObjMap<IntList> m)
Description copied from class: DiskValues
Add entries to the index.

Overrides:
index in class DiskValues
Parameters:
m - a set of pairs

delete

public void delete(TokenObjMap<IntList> m)
Description copied from class: DiskValues
Delete records from the index.

Overrides:
delete in class DiskValues
Parameters:
m - a set of pairs

replace

public void replace(byte[] o,
                    byte[] n,
                    int id)
Description copied from class: DiskValues
Remove record from the index.

Overrides:
replace in class DiskValues
Parameters:
o - old record key
n - new record key
id - record id