Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.data
Class MetaData

    java.lang.Object
      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-07, 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.
`java.lang.String` | `filename` Original filename of XML document.
`long` | `filesize` Original file size of XML document.
`boolean` | `ftxindex` Flag for creating a fulltext index.
`int` | `height` Maximum document height.
`long` | `lastid` Last (highest) id assigned to a node.
`long` | `time` Modification time.
`boolean` | `txtindex` Flag for creating a text index.
`boolean` | `wrdindex` Flag for creating a word index.

Constructor Summary
`MetaData(java.lang.String db)` Constructor, specifying the database name.
`MetaData(java.lang.String file, java.lang.String db)` Constructor, specifying the database name and the input file.

Method Summary
`void` | `noIndex()` Deletes/resets the indexes.
`int` | `read()` Opens the metadata for the current database and returns the table size.
`static boolean` | `sameAs(java.lang.String path, java.lang.String db)` Checks if the specified database refers to the specified file.
`void` | `write(int siz)` Writes the database to the specified path.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### atvindex

    public boolean atvindex

  Flag for creating a attribute value index.

### chop

    public boolean chop

  Flag for whitespace chopping.

### dbname

    public java.lang.String dbname

  Database name.

### encoding

    public java.lang.String encoding

  Encoding of XML document.

### entity

    public boolean entity

  Flag for entity parsing.

### filename

    public java.lang.String filename

  Original filename of XML document.

### filesize

    public long filesize

  Original file size of XML document.

### ftxindex

    public boolean ftxindex

  Flag for creating a fulltext index.

### height

    public int height

  Maximum document height.

### lastid

    public long lastid

  Last (highest) id assigned to a node.

### time

    public long time

  Modification time.

### txtindex

    public boolean txtindex

  Flag for creating a text index.

### wrdindex

    public boolean wrdindex

  Flag for creating a word index.

Constructor Detail

### MetaData

    public MetaData(java.lang.String db)

  Constructor, specifying the database name.

  Parameters:
    `db` - database name

### MetaData

    public MetaData(java.lang.String file,
                    java.lang.String db)

  Constructor, specifying the database name and the input file.

  Parameters:
    `file` - input file
    `db` - database name

Method Detail

### noIndex

    public void noIndex()

  Deletes/resets the indexes.

### read

    public int read()
             throws java.io.IOException

  Opens the metadata for the current database and returns the table size.

  Returns:
    table size
  Throws:
    `java.io.IOException` - IO Exception

### sameAs

    public static boolean sameAs(java.lang.String path,
                                 java.lang.String db)

  Checks if the specified database refers to the specified file.

  Parameters:
    `path` - file path (incl. file name)
    `db` - database name
  Returns:
    result of check

### write

    public void write(int siz)
               throws java.io.IOException

  Writes the database to the specified path.

  Parameters:
    `siz` - current database size
  Throws:
    `java.io.IOException` - IO Exception

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD