org.basex.data
Class MetaData

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

public final class MetaData
extends Object

This class provides meta information on a database.

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

Field Summary
 boolean atvindex
          Flag for creating a attribute value index.
 String backing
          DeepFS backing path.
 boolean casesens
          Flag for full-text case sensitivity.
 boolean chop
          Flag for whitespace chopping.
 boolean deepfs
          Flag for DeepFS instance.
 boolean diacritics
          Flag for full-text diacritics removal.
 boolean dirty
          Dirty flag.
 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.
 int ftscmax
          Maximal indexed full-text score.
 int ftscmin
          Minimal indexed full-text score.
 boolean ftxindex
          Flag for creating a full-text index.
 int height
          Maximum document height.
 int lastid
          Last (highest) id assigned to a node.
 String mount
          DeepFS mount point.
 String name
          Database name.
 int ndocs
          Number of XML documents.
 boolean oldindex
          Flag for out-of-dates indexes.
 Prop prop
          Properties.
 boolean pthindex
          Flag for creating a path summary.
 int scoring
          Scoring mode: see Prop.SCORING.
 int size
          Table size.
 boolean stemming
          Flag for full-text stemming.
 long time
          Modification time.
 boolean txtindex
          Flag for creating a text index.
 boolean uptodate
          Flag for removed index structures.
 Users users
          Database users.
 boolean wildcards
          Flag for wildcard indexing.
 
Constructor Summary
MetaData(String db, Prop pr)
          Constructor, specifying the database name.
 
Method Summary
 File file(String fn)
          Adds the database suffix to the specified filename and creates a file instance.
static boolean found(String path, String db, Prop pr)
          Checks if the specified file path refers to the specified database.
 void read(DataInput in)
          Opens the metadata for the current database and returns the table size.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prop

public final Prop prop
Properties.


name

public String name
Database name.


users

public Users users
Database users.


encoding

public 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 full-text index.


pthindex

public boolean pthindex
Flag for creating a path summary.


wildcards

public boolean wildcards
Flag for wildcard indexing.


stemming

public boolean stemming
Flag for full-text stemming.


casesens

public boolean casesens
Flag for full-text case sensitivity.


diacritics

public boolean diacritics
Flag for full-text diacritics removal.


ftscmax

public int ftscmax
Maximal indexed full-text score.


ftscmin

public int ftscmin
Minimal indexed full-text score.


scoring

public int scoring
Scoring mode: see Prop.SCORING.


uptodate

public boolean uptodate
Flag for removed index structures.


dirty

public boolean dirty
Dirty flag.


oldindex

public boolean oldindex
Flag for out-of-dates indexes.


size

public int size
Table size.


lastid

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


mount

public String mount
DeepFS mount point.


backing

public String backing
DeepFS backing path.


deepfs

public boolean deepfs
Flag for DeepFS instance.

Constructor Detail

MetaData

public MetaData(String db,
                Prop pr)
Constructor, specifying the database name.

Parameters:
db - database name
pr - database properties
Method Detail

found

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

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

file

public File file(String fn)
Adds the database suffix to the specified filename and creates a file instance.

Parameters:
fn - filename
Returns:
database filename

read

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

Parameters:
in - input stream
Throws:
IOException - I/O exception