org.basex.core
Class MainProp

java.lang.Object
  extended by org.basex.core.AProp
      extended by org.basex.core.MainProp
All Implemented Interfaces:
java.lang.Iterable<java.lang.String>

public final class MainProp
extends AProp

This class assembles admin properties which are used all around the project. They are also stored in the project's home directory.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
static java.lang.Object[] C_CLIENT
          Comment: written to property file.
static java.lang.Object[] C_GENERAL
          Comment: written to property file.
static java.lang.Object[] C_HTTP
          Comment: written to property file.
static java.lang.Object[] DBPATH
          Database path.
static java.lang.Object[] DEBUG
          Debug mode.
static java.lang.Object[] EVENTPORT
          Server: port, used for sending events.
static java.lang.Object[] GLOBALLOCK
          Applied locking algorithm: local (database) vs.
static java.lang.Object[] HOST
          Server: host, used for connecting new clients.
static java.lang.Object[] HTTPLOCAL
          Local (embedded) mode.
static java.lang.Object[] KEEPALIVE
          Keep alive time of clients; deactivated if set to 0.
static java.lang.Object[] LANG
          Language name.
static java.lang.Object[] LANGKEYS
          Flag to include key names in the language strings.
static java.lang.Object[] LOG
          Logging flag.
static java.lang.Object[] LOGMSGMAXLEN
          Log message cut-off.
static java.lang.Object[] NONPROXYHOSTS
          Server: non-proxy host.
static java.lang.Object[] PARALLEL
          Defines the number of parallel readers.
static java.lang.Object[] PASSWORD
          Default password.
static java.lang.Object[] PORT
          Server: port, used for connecting new clients.
static java.lang.Object[] PROXYHOST
          Server: proxy host.
static java.lang.Object[] PROXYPORT
          Server: proxy port.
static java.lang.Object[] REPOPATH
          Package repository path.
static java.lang.Object[] RESTXQPATH
          RESTXQ path (relative to web path).
static java.lang.Object[] SERVERHOST
          Server: host, used for binding the server.
static java.lang.Object[] SERVERPORT
          Server: port, used for binding the server.
static java.lang.Object[] STOPPORT
          Port for stopping the web server.
static java.lang.Object[] TIMEOUT
          Timeout (seconds) for processing client requests; deactivated if set to 0.
static java.lang.Object[] USER
          Default user.
static java.lang.Object[] WEBPATH
          Web path.
 
Fields inherited from class org.basex.core.AProp
props
 
Method Summary
 boolean dbexists(java.lang.String db)
          Checks if the specified database exists.
 IOFile dbpath()
          Returns the current database path.
 IOFile dbpath(java.lang.String db)
          Returns a reference to a database directory.
 java.lang.String random(java.lang.String db)
          Returns a random temporary name for the specified database.
 
Methods inherited from class org.basex.core.AProp
get, get, getSystem, getSystem, invert, is, iterator, num, nums, parse, props, sameAs, set, set, set, set, set, set, setObject, setSystem, setSystem, setSystem, similar, strings, toString, unknown, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

C_GENERAL

public static final java.lang.Object[] C_GENERAL
Comment: written to property file.


DBPATH

public static final java.lang.Object[] DBPATH
Database path.


REPOPATH

public static final java.lang.Object[] REPOPATH
Package repository path.


DEBUG

public static final java.lang.Object[] DEBUG
Debug mode.


LANG

public static final java.lang.Object[] LANG
Language name.


LANGKEYS

public static final java.lang.Object[] LANGKEYS
Flag to include key names in the language strings.


GLOBALLOCK

public static final java.lang.Object[] GLOBALLOCK
Applied locking algorithm: local (database) vs. global (process) locking.


C_CLIENT

public static final java.lang.Object[] C_CLIENT
Comment: written to property file.


HOST

public static final java.lang.Object[] HOST
Server: host, used for connecting new clients.


PORT

public static final java.lang.Object[] PORT
Server: port, used for connecting new clients.


SERVERPORT

public static final java.lang.Object[] SERVERPORT
Server: port, used for binding the server.


EVENTPORT

public static final java.lang.Object[] EVENTPORT
Server: port, used for sending events.


USER

public static final java.lang.Object[] USER
Default user.


PASSWORD

public static final java.lang.Object[] PASSWORD
Default password.


SERVERHOST

public static final java.lang.Object[] SERVERHOST
Server: host, used for binding the server. Empty string for wildcard.


PROXYHOST

public static final java.lang.Object[] PROXYHOST
Server: proxy host.


PROXYPORT

public static final java.lang.Object[] PROXYPORT
Server: proxy port.


NONPROXYHOSTS

public static final java.lang.Object[] NONPROXYHOSTS
Server: non-proxy host.


TIMEOUT

public static final java.lang.Object[] TIMEOUT
Timeout (seconds) for processing client requests; deactivated if set to 0.


KEEPALIVE

public static final java.lang.Object[] KEEPALIVE
Keep alive time of clients; deactivated if set to 0.


PARALLEL

public static final java.lang.Object[] PARALLEL
Defines the number of parallel readers.


LOG

public static final java.lang.Object[] LOG
Logging flag.


LOGMSGMAXLEN

public static final java.lang.Object[] LOGMSGMAXLEN
Log message cut-off.


C_HTTP

public static final java.lang.Object[] C_HTTP
Comment: written to property file.


WEBPATH

public static final java.lang.Object[] WEBPATH
Web path.


RESTXQPATH

public static final java.lang.Object[] RESTXQPATH
RESTXQ path (relative to web path).


HTTPLOCAL

public static final java.lang.Object[] HTTPLOCAL
Local (embedded) mode.


STOPPORT

public static final java.lang.Object[] STOPPORT
Port for stopping the web server.

Method Detail

dbpath

public IOFile dbpath(java.lang.String db)
Returns a reference to a database directory.

Parameters:
db - name of the database
Returns:
database directory

random

public java.lang.String random(java.lang.String db)
Returns a random temporary name for the specified database.

Parameters:
db - name of database
Returns:
random name

dbpath

public IOFile dbpath()
Returns the current database path.

Returns:
database filename

dbexists

public boolean dbexists(java.lang.String db)
Checks if the specified database exists.

Parameters:
db - name of the database
Returns:
result of check