public final class MetaData
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
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.
|
int |
maxscore
Maximal indexed full-text score.
|
int |
minscore
Minimal indexed full-text score.
|
java.lang.String |
name
Database name.
|
int |
ndocs
Number of stored documents.
|
boolean |
oldindex
Flag for out-of-date indexes.
|
java.lang.String |
original
Path to original document.
|
IOFile |
path
Database path.
|
Prop |
prop
Properties.
|
int |
scoring
Scoring mode: see
Prop.SCORING. |
int |
size
Table size.
|
boolean |
stemming
Flag for full-text stemming.
|
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.
|
boolean |
wildcards
Flag for wildcard indexing.
|
| Constructor and Description |
|---|
MetaData(Prop pr)
Constructor, specifying the database properties.
|
MetaData(java.lang.String db,
Context ctx)
Constructor, specifying the database name and context.
|
MetaData(java.lang.String db,
Prop pr,
MainProp mprop)
Constructor, specifying the database name.
|
| Modifier and Type | Method and Description |
|---|---|
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 boolean |
found(java.lang.String path,
java.lang.String db,
MainProp mprop)
Checks if the specified file path refers to the specified database.
|
static java.lang.String |
normPath(java.lang.String path)
Normalizes a database path.
|
void |
read(DataInput in)
Reads in meta data from the specified stream.
|
static boolean |
validName(java.lang.String name,
boolean glob)
Checks if the specified database name is valid, matching the pattern
[-\w]+, or [-\w*?,]+ if the glob flag is activated. |
public final IOFile path
null if database is in main memory.public final Prop prop
public java.lang.String name
public Users users
public java.lang.String encoding
public java.lang.String original
public long filesize
public int ndocs
public long time
public boolean chop
public boolean updindex
public boolean textindex
public boolean attrindex
public boolean ftxtindex
public boolean createtext
public boolean createattr
public boolean createftxt
public boolean wildcards
public boolean stemming
public boolean casesens
public boolean diacritics
public int maxscore
public int minscore
public int scoring
Prop.SCORING.public int maxcats
public int maxlen
public Language language
public boolean uptodate
public boolean oldindex
public boolean corrupt
public boolean dirty
public int size
public int lastid
public MetaData(Prop pr)
pr - database propertiespublic MetaData(java.lang.String db,
Context ctx)
db - name of the databasectx - database contextpublic static boolean found(java.lang.String path,
java.lang.String db,
MainProp mprop)
path - file pathdb - name of the databasemprop - main propertiespublic static java.lang.String normPath(java.lang.String path)
null if the path contains invalid characters.path - input pathnullpublic static boolean validName(java.lang.String name,
boolean glob)
[-\w]+, or [-\w*?,]+ if the glob flag is activated.name - name to be checkedglob - allow glob syntaxpublic long dbsize()
public long dbtime()
public IOFile dbfile(java.lang.String fn)
fn - filenamepublic 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 pathpublic boolean drop(java.lang.String pat)
pat - file pattern, or null if all files are to be deletedpublic void read(DataInput in) throws java.io.IOException
in - input streamjava.io.IOException - I/O exception