Class StaticOptions

java.lang.Object
org.basex.util.options.Options
org.basex.core.StaticOptions
All Implemented Interfaces:
Iterable<Option<?>>

public final class StaticOptions extends Options
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
  • Field Details

    • C_GENERAL

      public static final Comment C_GENERAL
      Comment: written to options file.
    • DEBUG

      public static final BooleanOption DEBUG
      Debug mode.
    • DBPATH

      public static final StringOption DBPATH
      Database path.
    • LOGPATH

      public static final StringOption LOGPATH
      Log path (relative to database path).
    • REPOPATH

      public static final StringOption REPOPATH
      Package repository path.
    • LANG

      public static final StringOption LANG
      Language name.
    • LANGKEYS

      public static final BooleanOption LANGKEYS
      Flag to include key names in the language strings.
    • FAIRLOCK

      public static final BooleanOption FAIRLOCK
      Locking strategy.
    • CACHETIMEOUT

      public static final NumberOption CACHETIMEOUT
      Timeout (seconds) for remembering result of asynchronous queries.
    • C_CLIENT

      public static final Comment C_CLIENT
      Comment: written to options file.
    • HOST

      public static final StringOption HOST
      Server: host, used for connecting new clients.
    • PORT

      public static final NumberOption PORT
      Server: port, used for connecting new clients.
    • SERVERPORT

      public static final NumberOption SERVERPORT
      Server: port, used for binding the server.
    • USER

      public static final StringOption USER
      Default user.
    • PASSWORD

      public static final StringOption PASSWORD
      Default password.
    • SERVERHOST

      public static final StringOption SERVERHOST
      Server: host, used for binding the server. Empty string for wildcard.
    • PROXYHOST

      public static final StringOption PROXYHOST
      Server: proxy host (default: ignored).
    • PROXYPORT

      public static final NumberOption PROXYPORT
      Server: proxy port (default: ignored).
    • NONPROXYHOSTS

      public static final StringOption NONPROXYHOSTS
      Server: non-proxy host.
    • IGNORECERT

      public static final BooleanOption IGNORECERT
      Ignore missing certificates.
    • IGNOREHOSTNAME

      public static final BooleanOption IGNOREHOSTNAME
      Ignore verification of hostname in certificates.
    • TIMEOUT

      public static final NumberOption TIMEOUT
      Timeout (seconds) for processing client requests; deactivated if set to 0.
    • KEEPALIVE

      public static final NumberOption KEEPALIVE
      Keep alive time (seconds) for clients; deactivated if set to 0.
    • PARALLEL

      public static final NumberOption PARALLEL
      Defines the number of parallel readers.
    • LOG

      public static final BooleanOption LOG
      Logging flag.
    • LOGMSGMAXLEN

      public static final NumberOption LOGMSGMAXLEN
      Log message cut-off.
    • LOGTRACE

      public static final BooleanOption LOGTRACE
      Write trace output to logs.
    • C_HTTP

      public static final Comment C_HTTP
      Comment: written to options file.
    • WEBPATH

      public static final StringOption WEBPATH
      Web path (cannot be specified in web.xml).
    • GZIP

      public static final BooleanOption GZIP
      Enable GZIP support (cannot be specified in web.xml).
    • RESTPATH

      public static final StringOption RESTPATH
      REST path (relative to web path).
    • RESTXQPATH

      public static final StringOption RESTXQPATH
      RESTXQ path (relative to web path).
    • PARSERESTXQ

      public static final NumberOption PARSERESTXQ
      Minimum timeout for parsing RESTXQ files.
    • RESTXQERRORS

      public static final BooleanOption RESTXQERRORS
      Show errors in RESTXQ directory.
    • HTTPLOCAL

      public static final BooleanOption HTTPLOCAL
      Local (embedded) mode.
    • STOPPORT

      public static final NumberOption STOPPORT
      Port for stopping the web server.
    • AUTHMETHOD

      public static final EnumOption<StaticOptions.AuthMethod> AUTHMETHOD
      Default authentication method.
  • Constructor Details

    • StaticOptions

      public StaticOptions(boolean file)
      Constructor, adopting system properties starting with "org.basex.".
      Parameters:
      file - if true, options will be read from disk
  • Method Details

    • setSystem

      public void setSystem()
      Description copied from class: Options
      Overwrites the options with global options and system properties. All properties starting with org.basex. will be assigned as options.
      Overrides:
      setSystem in class Options
    • dbPath

      public IOFile dbPath(String name)
      Returns a reference to a file or database in the database directory.
      Parameters:
      name - name of the file or database
      Returns:
      database directory
    • createTempDb

      public String createTempDb(String name)
      Creates a temporary database directory and returns its name.
      Parameters:
      name - name of the original database
      Returns:
      name of random database
    • dbPath

      public IOFile dbPath()
      Returns the path to the directory that contains all databases.
      Returns:
      database filename
    • dbExists

      public boolean dbExists(String db)
      Checks if the specified database exists.
      Parameters:
      db - name of the database
      Returns:
      result of check