Package org.basex.core
Class StaticOptions
java.lang.Object
org.basex.util.options.Options
org.basex.core.StaticOptions
This class defines options which are used all around the project.
The initial keys and values are also stored in the project's home directory.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.basex.util.options.Options
Options.YesNo, Options.YesNoOmit -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EnumOption<StaticOptions.AuthMethod>Default authentication method.static final CommentComment: written to options file.static final CommentComment: written to options file.static final CommentComment: written to options file.static final NumberOptionTimeout (seconds) for remembering result of asynchronous queries.static final StringOptionDatabase path.static final BooleanOptionDebug mode.static final BooleanOptionLocking strategy.static final BooleanOptionEnable GZIP support (cannot be specified in web.xml).static final StringOptionServer: host, used for connecting new clients.static final BooleanOptionLocal (embedded) mode.static final BooleanOptionIgnore missing certificates.static final BooleanOptionIgnore verification of hostname in certificates.static final NumberOptionKeep alive time (seconds) for clients; deactivated if set to 0.static final StringOptionLanguage name.static final BooleanOptionFlag to include key names in the language strings.static final BooleanOptionLogging flag.static final NumberOptionLog message cut-off.static final StringOptionLog path (relative to database path).static final BooleanOptionWrite trace output to logs.static final StringOptionServer: non-proxy host.static final NumberOptionDefines the number of parallel readers.static final NumberOptionMinimum timeout for parsing RESTXQ files.static final StringOptionDefault password.static final NumberOptionServer: port, used for connecting new clients.static final StringOptionServer: proxy host (default: ignored).static final NumberOptionServer: proxy port (default: ignored).static final StringOptionPackage repository path.static final StringOptionREST path (relative to web path).static final BooleanOptionShow errors in RESTXQ directory.static final StringOptionRESTXQ path (relative to web path).static final StringOptionServer: host, used for binding the server.static final NumberOptionServer: port, used for binding the server.static final NumberOptionPort for stopping the web server.static final NumberOptionTimeout (seconds) for processing client requests; deactivated if set to 0.static final StringOptionDefault user.static final StringOptionWeb path (cannot be specified in web.xml). -
Constructor Summary
ConstructorsConstructorDescriptionStaticOptions(boolean file) Constructor, adopting system properties starting with "org.basex.". -
Method Summary
Modifier and TypeMethodDescriptioncreateTempDb(String name) Creates a temporary database directory and returns its name.booleanChecks if the specified database exists.dbPath()Returns the path to the directory that contains all databases.Returns a reference to a file or database in the database directory.voidOverwrites the options with global options and system properties.Methods inherited from class org.basex.util.options.Options
allowed, assign, assign, assign, assign, assign, contains, error, free, get, get, get, get, get, get, get, get, get, invert, iterator, names, option, put, set, set, set, set, set, set, set, set, toMap, toMap, toString, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
C_GENERAL
Comment: written to options file. -
DEBUG
Debug mode. -
DBPATH
Database path. -
LOGPATH
Log path (relative to database path). -
REPOPATH
Package repository path. -
LANG
Language name. -
LANGKEYS
Flag to include key names in the language strings. -
FAIRLOCK
Locking strategy. -
CACHETIMEOUT
Timeout (seconds) for remembering result of asynchronous queries. -
C_CLIENT
Comment: written to options file. -
HOST
Server: host, used for connecting new clients. -
PORT
Server: port, used for connecting new clients. -
SERVERPORT
Server: port, used for binding the server. -
USER
Default user. -
PASSWORD
Default password. -
SERVERHOST
Server: host, used for binding the server. Empty string for wildcard. -
PROXYHOST
Server: proxy host (default: ignored). -
PROXYPORT
Server: proxy port (default: ignored). -
NONPROXYHOSTS
Server: non-proxy host. -
IGNORECERT
Ignore missing certificates. -
IGNOREHOSTNAME
Ignore verification of hostname in certificates. -
TIMEOUT
Timeout (seconds) for processing client requests; deactivated if set to 0. -
KEEPALIVE
Keep alive time (seconds) for clients; deactivated if set to 0. -
PARALLEL
Defines the number of parallel readers. -
LOG
Logging flag. -
LOGMSGMAXLEN
Log message cut-off. -
LOGTRACE
Write trace output to logs. -
C_HTTP
Comment: written to options file. -
WEBPATH
Web path (cannot be specified in web.xml). -
GZIP
Enable GZIP support (cannot be specified in web.xml). -
RESTPATH
REST path (relative to web path). -
RESTXQPATH
RESTXQ path (relative to web path). -
PARSERESTXQ
Minimum timeout for parsing RESTXQ files. -
RESTXQERRORS
Show errors in RESTXQ directory. -
HTTPLOCAL
Local (embedded) mode. -
STOPPORT
Port for stopping the web server. -
AUTHMETHOD
Default authentication method.
-
-
Constructor Details
-
StaticOptions
public StaticOptions(boolean file) Constructor, adopting system properties starting with "org.basex.".- Parameters:
file- iftrue, options will be read from disk
-
-
Method Details
-
setSystem
public void setSystem()Description copied from class:OptionsOverwrites the options with global options and system properties. All properties starting withorg.basex.will be assigned as options. -
dbPath
Returns a reference to a file or database in the database directory.- Parameters:
name- name of the file or database- Returns:
- database directory
-
createTempDb
Creates a temporary database directory and returns its name.- Parameters:
name- name of the original database- Returns:
- name of random database
-
dbPath
Returns the path to the directory that contains all databases.- Returns:
- database filename
-
dbExists
Checks if the specified database exists.- Parameters:
db- name of the database- Returns:
- result of check
-