|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.MetaData
public final class MetaData
This class provides meta information on a database.
Field Summary | |
---|---|
boolean |
attrindex
Indicates if a attribute index exists. |
boolean |
casesens
Flag for full-text case sensitivity. |
boolean |
chop
Flag for whitespace chopping. |
boolean |
corrupt
Flag to indicate possible corruption. |
boolean |
createattr
Indicates if attribute index is to be recreated. |
boolean |
createftxt
Indicates if full-text index is to be recreated. |
boolean |
createtext
Indicates if text index is to be recreated. |
boolean |
diacritics
Flag for full-text diacritics removal. |
boolean |
dirty
Dirty flag. |
java.lang.String |
encoding
Encoding of original document. |
long |
filesize
Size of original document. |
boolean |
ftxtindex
Indicates if a full-text index exists. |
Language |
language
Language of full-text search index. |
int |
lastid
Last (highest) id assigned to a node. |
int |
maxcats
Maximum number of categories. |
int |
maxlen
Maximum token length. |
java.lang.String |
name
Database name. |
int |
ndocs
Number of stored documents. |
java.lang.String |
original
Path to original document. |
IOFile |
path
Database path. |
Prop |
prop
Properties. |
int |
size
Table size. |
boolean |
stemming
Flag for full-text stemming. |
java.lang.String |
stopwords
Full-text stopword file. |
boolean |
textindex
Indicates if a text index exists. |
long |
time
Timestamp of original document. |
boolean |
updindex
Flag for activated automatic index update. |
boolean |
uptodate
Flag for out-of-date index structures. |
Users |
users
Database users. |
Constructor Summary | |
---|---|
MetaData(Prop pr)
Constructor, specifying the database properties. |
|
MetaData(java.lang.String db,
Context ctx)
Constructor, specifying the database name and context. |
Method Summary | |
---|---|
IOFile |
binaries()
Returns the binary directory. |
IOFile |
binary(java.lang.String pth)
Returns the specified binary file, or null if the resource
path cannot be resolved (e.g. |
IOFile |
dbfile(java.lang.String fn)
Returns a file instance for the specified database file. |
long |
dbsize()
Returns the disk size of the database. |
long |
dbtime()
Returns the disk timestamp of the database. |
boolean |
drop(java.lang.String pat)
Drops the specified database files. |
static IOFile |
file(IOFile path,
java.lang.String fn)
Creates a database file. |
static java.lang.String |
normPath(java.lang.String path)
Normalizes a database path. |
boolean |
oldindex()
Returns true if the indexes need to be updated. |
void |
read()
Reads in all meta data. |
void |
read(DataInput in)
Reads in meta data from the specified stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final IOFile path
null
if database is in main memory.
public final Prop prop
public volatile java.lang.String name
public volatile Users users
public volatile java.lang.String encoding
public volatile java.lang.String original
public volatile long filesize
public volatile int ndocs
public volatile long time
public volatile boolean chop
public volatile boolean updindex
public volatile boolean textindex
public volatile boolean attrindex
public volatile boolean ftxtindex
public volatile boolean createtext
public volatile boolean createattr
public volatile boolean createftxt
public volatile boolean stemming
public volatile boolean casesens
public volatile boolean diacritics
public volatile java.lang.String stopwords
public volatile int maxcats
public volatile int maxlen
public volatile Language language
public volatile boolean uptodate
public volatile boolean corrupt
public volatile boolean dirty
public volatile int size
public volatile int lastid
Constructor Detail |
---|
public MetaData(Prop pr)
pr
- database propertiespublic MetaData(java.lang.String db, Context ctx)
db
- name of the databasectx
- database contextMethod Detail |
---|
public static java.lang.String normPath(java.lang.String path)
null
if the path contains invalid characters.
path
- input path
null
public static IOFile file(IOFile path, java.lang.String fn)
path
- database pathfn
- filename
public boolean oldindex()
public long dbsize()
public long dbtime()
public IOFile dbfile(java.lang.String fn)
fn
- filename
public IOFile binaries()
public IOFile binary(java.lang.String pth)
null
if the resource
path cannot be resolved (e.g. if it points to a parent directory).
pth
- internal file path
public boolean drop(java.lang.String pat)
pat
- file pattern, or null
if all files are to be deleted
public void read() throws java.io.IOException
java.io.IOException
- exceptionpublic void read(DataInput in) throws java.io.IOException
in
- input stream
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |