org.basex.core
Class Prop

java.lang.Object
  extended by org.basex.core.Prop

public final class Prop
extends java.lang.Object

This class assembles properties which are used all around the project. They are initially read from and finally written to disk.

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

Field Summary
static boolean allInfo
          Detailed query info.
static boolean attrindex
          Flag for creating an attribute value index.
static boolean chop
          Flag for whitespace chopping.
static java.lang.String createfilter
          Path for filtering XML Documents.
static java.lang.String dbpath
          Database path.
static boolean debug
          Debug mode.
static boolean dotplan
          Dots the Query plan.
static boolean dotresult
          Dots the Result.
static java.lang.String dotty
          Path to dotty.
static boolean dtd
          Flag for parsing DTDs in internal parser.
static java.lang.String ENCODING
          Returns the system's default encoding.
static boolean entity
          Flag for entity parsing in internal parser.
static boolean fscont
          Flag for importing file contents.
static boolean fsmeta
          Flag for importing file metadata.
static boolean fsmode
          Filesystem mode.
static int fstextmax
          Maximum size for textual imports.
static boolean ftcs
          Flag for fulltext case sensitivity.
static boolean ftdc
          Flag for fulltext diacritics.
static boolean ftdetails
          Fulltext details.
static boolean ftfuzzy
          Flag for creating a fuzzy index.
static boolean ftindex
          Flag for creating a fulltext index.
static boolean ftittr
          Flag for iterator optimized storage within ftindex.
static boolean ftst
          Flag for fulltext stemming.
static java.lang.String HOME
          User's home directory.
static int indexocc
          Number of index occurrences to print in the index info.
static boolean info
          Short query info.
static boolean intparse
          Use internal XML parser.
static java.lang.String[] LANGCREDS
          Translation credits.
static java.lang.String language
          Language Name (currently: English or German).
static java.lang.String[] LANGUAGES
          Available languages (should be retrieved dynamically, but leads to problems with JAR file.
static int lserr
          Levenshtein default error.
static boolean mab2flat
          Flag for creating flat MAB2 data.
static boolean MAC
          Flag denoting if OS belongs to UNIX or Windows family.
static boolean mainmem
          Flag for loading database table into main memory.
static java.lang.String NL
          New line string.
static boolean onthefly
          Flag for creating databases on-the-fly (in memory).
static java.lang.String OS
          OS Flag (should be ignored whenever possible).
static java.lang.String phppath
          PHP Path.
static int port
          Port for client/server communication.
static int runs
          Number of query executions.
static boolean serialize
          Flag for serializing query results.
static boolean server
          Server mode.
static boolean SKIP
          The following options are not saved/read; don't remove this flag.
static boolean textindex
          Flag for creating a text index.
static int timeout
          Server timeout in seconds.
static boolean UNIX
          Flag denoting if OS belongs to UNIX or Windows family.
static java.lang.String USER
          User name.
static java.lang.String webpath
          Web Server path.
static int webport
          Port for web server.
static java.lang.String WORK
          Returns the current working directory.
static boolean xmloutput
          Flag for serialization as XML.
static boolean xmlplan
          Prints a XML plan.
static boolean xqerrcode
          Flow for showing the XQuery error code.
static boolean xqformat
          Format XQuery output.
static IO xquery
          Last XQuery file.
 
Method Summary
static void read()
          Reads the configuration file and initializes the project properties.
static void read(java.lang.String filename, java.lang.reflect.Field[] fields)
          Assigns the properties from the specified file to the field array.
static void write()
          Writes the configuration file.
static void write(java.lang.String filename, java.lang.reflect.Field[] fields)
          Writes the properties from field array to the specified file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODING

public static final java.lang.String ENCODING
Returns the system's default encoding.


WORK

public static final java.lang.String WORK
Returns the current working directory.


HOME

public static final java.lang.String HOME
User's home directory.


USER

public static final java.lang.String USER
User name.


OS

public static final java.lang.String OS
OS Flag (should be ignored whenever possible).


UNIX

public static final boolean UNIX
Flag denoting if OS belongs to UNIX or Windows family.


MAC

public static final boolean MAC
Flag denoting if OS belongs to UNIX or Windows family.


NL

public static final java.lang.String NL
New line string.


LANGUAGES

public static final java.lang.String[] LANGUAGES
Available languages (should be retrieved dynamically, but leads to problems with JAR file. Someone knows what to do?)


LANGCREDS

public static final java.lang.String[] LANGCREDS
Translation credits.


dbpath

public static java.lang.String dbpath
Database path.


webpath

public static java.lang.String webpath
Web Server path.


dotty

public static java.lang.String dotty
Path to dotty.


language

public static java.lang.String language
Language Name (currently: English or German).


port

public static int port
Port for client/server communication.


webport

public static int webport
Port for web server.


SKIP

public static final boolean SKIP
The following options are not saved/read; don't remove this flag.

See Also:
Constant Field Values

debug

public static boolean debug
Debug mode.


info

public static boolean info
Short query info.


allInfo

public static boolean allInfo
Detailed query info.


serialize

public static boolean serialize
Flag for serializing query results.


xmloutput

public static boolean xmloutput
Flag for serialization as XML.


dotplan

public static boolean dotplan
Dots the Query plan.


xmlplan

public static boolean xmlplan
Prints a XML plan.


dotresult

public static boolean dotresult
Dots the Result.


xqformat

public static boolean xqformat
Format XQuery output.


intparse

public static boolean intparse
Use internal XML parser.


dtd

public static boolean dtd
Flag for parsing DTDs in internal parser.


entity

public static boolean entity
Flag for entity parsing in internal parser.


runs

public static int runs
Number of query executions.


chop

public static boolean chop
Flag for whitespace chopping.


ftindex

public static boolean ftindex
Flag for creating a fulltext index.


textindex

public static boolean textindex
Flag for creating a text index.


attrindex

public static boolean attrindex
Flag for creating an attribute value index.


mainmem

public static boolean mainmem
Flag for loading database table into main memory.


onthefly

public static boolean onthefly
Flag for creating databases on-the-fly (in memory).


createfilter

public static java.lang.String createfilter
Path for filtering XML Documents.


indexocc

public static int indexocc
Number of index occurrences to print in the index info.


ftittr

public static boolean ftittr
Flag for iterator optimized storage within ftindex.


ftfuzzy

public static boolean ftfuzzy
Flag for creating a fuzzy index.


ftst

public static boolean ftst
Flag for fulltext stemming.


ftcs

public static boolean ftcs
Flag for fulltext case sensitivity.


ftdc

public static boolean ftdc
Flag for fulltext diacritics.


xqerrcode

public static boolean xqerrcode
Flow for showing the XQuery error code.


ftdetails

public static boolean ftdetails
Fulltext details.


xquery

public static IO xquery
Last XQuery file.


fscont

public static boolean fscont
Flag for importing file contents.


fsmeta

public static boolean fsmeta
Flag for importing file metadata.


fstextmax

public static int fstextmax
Maximum size for textual imports.


fsmode

public static boolean fsmode
Filesystem mode.


lserr

public static int lserr
Levenshtein default error.


mab2flat

public static boolean mab2flat
Flag for creating flat MAB2 data.


server

public static boolean server
Server mode.


timeout

public static int timeout
Server timeout in seconds.


phppath

public static java.lang.String phppath
PHP Path.

Method Detail

read

public static void read()
Reads the configuration file and initializes the project properties. The file is located in the user's home directory.


read

public static void read(java.lang.String filename,
                        java.lang.reflect.Field[] fields)
Assigns the properties from the specified file to the field array.

Parameters:
filename - file to be read
fields - fields to be assigned

write

public static void write()
Writes the configuration file.


write

public static void write(java.lang.String filename,
                         java.lang.reflect.Field[] fields)
Writes the properties from field array to the specified file.

Parameters:
filename - file to be read
fields - fields to be assigned