org.basex.data
Class MetaData

java.lang.Object
  extended by org.basex.data.MetaData

public final class MetaData
extends java.lang.Object

This class provides meta information on a database.

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

Field Summary
 boolean atvindex
          Flag for creating a attribute value index.
 boolean chop
          Flag for whitespace chopping.
 java.lang.String dbname
          Database name.
 java.lang.String encoding
          Encoding of XML document.
 boolean entity
          Flag for entity parsing.
 IO file
          Original filename of XML document.
 long filesize
          Original file size of XML document.
 boolean ftcs
          Flag for fulltext case sensitivity.
 boolean ftdc
          Flag for fulltext diacritics removal.
 boolean ftfz
          Flag for fuzzy indexing.
 boolean ftittr
          Flag for iterator optimized storage within ftindex.
 boolean ftst
          Flag for fulltext stemming.
 boolean ftxindex
          Flag for creating a fulltext index.
 int height
          Maximum document height.
 int lastid
          Last (highest) id assigned to a node.
 int ndocs
          Number of XML documents.
 boolean newindex
          Flag for removed index structures.
 long time
          Modification time.
 boolean txtindex
          Flag for creating a text index.
 
Constructor Summary
MetaData(java.lang.String db)
          Constructor, specifying the database name.
 
Method Summary
 void finish(DataOutput out, int siz)
          Writes the database to the specified path.
static boolean found(java.lang.String path, java.lang.String db)
          Checks if the specified file path refers to the specified database.
 int read(DataInput in)
          Opens the metadata for the current database and returns the table size.
 void update()
          Notifies the meta structures of an update.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbname

public java.lang.String dbname
Database name.


encoding

public java.lang.String encoding
Encoding of XML document.


file

public IO file
Original filename of XML document.


filesize

public long filesize
Original file size of XML document.


ndocs

public int ndocs
Number of XML documents.


height

public int height
Maximum document height.


time

public long time
Modification time.


chop

public boolean chop
Flag for whitespace chopping.


entity

public boolean entity
Flag for entity parsing.


txtindex

public boolean txtindex
Flag for creating a text index.


atvindex

public boolean atvindex
Flag for creating a attribute value index.


ftxindex

public boolean ftxindex
Flag for creating a fulltext index.


ftittr

public boolean ftittr
Flag for iterator optimized storage within ftindex.


ftfz

public boolean ftfz
Flag for fuzzy indexing.


ftst

public boolean ftst
Flag for fulltext stemming.


ftcs

public boolean ftcs
Flag for fulltext case sensitivity.


ftdc

public boolean ftdc
Flag for fulltext diacritics removal.


newindex

public boolean newindex
Flag for removed index structures.


lastid

public int lastid
Last (highest) id assigned to a node.

Constructor Detail

MetaData

public MetaData(java.lang.String db)
Constructor, specifying the database name.

Parameters:
db - database name
Method Detail

found

public static boolean found(java.lang.String path,
                            java.lang.String db)
Checks if the specified file path refers to the specified database.

Parameters:
path - file path
db - database name
Returns:
result of check

update

public void update()
Notifies the meta structures of an update. Deletes/resets the indexes.


read

public int read(DataInput in)
         throws java.io.IOException
Opens the metadata for the current database and returns the table size.

Parameters:
in - input stream
Returns:
table size
Throws:
java.io.IOException - I/O Exception

finish

public void finish(DataOutput out,
                   int siz)
            throws java.io.IOException
Writes the database to the specified path.

Parameters:
out - output stream
siz - current database size
Throws:
java.io.IOException - IO Exception