Class Prop

java.lang.Object
org.basex.util.Prop

public final class Prop extends Object
This class contains constants and system properties which are used all around the project.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    Respect lower/upper case when doing file comparisons.
    static final String
    Prefix for project specific options.
    static boolean
    Debug mode.
    static final String
    Returns the system's default encoding.
    static boolean
    GUI mode.
    static final String
    Project home directory.
    static final String
    Java version.
    static final boolean
    JDK version is Java 1.8.
    static boolean
    Flag for prefixing texts with their keys (helps while translating texts).
    static boolean
    Rendering orientation (right vs.
    static String
    Language (applied after restart).
    static final URL
    Application URL.
    static final boolean
    Flag denoting if OS belongs to Mac family.
    static final String
    Project name.
    static final String
    System-specific newline string.
    static final String
    System property for specifying database home directory.
    static final String
    Project name.
    static final String
    System's temporary directory.
    static final String
    Code version (may contain major, minor and optional patch number).
    static final boolean
    Flag denoting if OS belongs to Windows family.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Removes all global options.
    Returns all global options and system properties.
    static String
    get(String name)
    Returns a system property or global option.
    static void
    put(String name, String value)
    Sets a global option.
    static void
    put(Option<?> option, String value)
    Sets a global option.
    static void
    setSystem(String name, String value)
    Sets a system property if it has not been set before.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NAME

      public static final String NAME
      Project name.
      See Also:
    • VERSION

      public static final String VERSION
      Code version (may contain major, minor and optional patch number).
    • PROJECT

      public static final String PROJECT
      Project name.
    • NL

      public static final String NL
      System-specific newline string.
    • ENCODING

      public static final String ENCODING
      Returns the system's default encoding.
    • MAC

      public static final boolean MAC
      Flag denoting if OS belongs to Mac family.
    • WIN

      public static final boolean WIN
      Flag denoting if OS belongs to Windows family.
    • CASE

      public static final boolean CASE
      Respect lower/upper case when doing file comparisons.
    • JAVA

      public static final String JAVA
      Java version.
    • JAVA8

      public static final boolean JAVA8
      JDK version is Java 1.8.
    • DBPREFIX

      public static final String DBPREFIX
      Prefix for project specific options.
      See Also:
    • PATH

      public static final String PATH
      System property for specifying database home directory.
      See Also:
    • LOCATION

      public static final URL LOCATION
      Application URL.
    • TEMPDIR

      public static final String TEMPDIR
      System's temporary directory.
    • HOMEDIR

      public static final String HOMEDIR
      Project home directory.
    • language

      public static String language
      Language (applied after restart).
    • langkeys

      public static boolean langkeys
      Flag for prefixing texts with their keys (helps while translating texts).
    • langright

      public static boolean langright
      Rendering orientation (right vs. left).
    • debug

      public static boolean debug
      Debug mode.
    • gui

      public static boolean gui
      GUI mode.
  • Method Details

    • put

      public static void put(Option<?> option, String value)
      Sets a global option.
      Parameters:
      option - option
      value - value
    • put

      public static void put(String name, String value)
      Sets a global option.
      Parameters:
      name - name of the option
      value - value
    • clear

      public static void clear()
      Removes all global options.
    • get

      public static String get(String name)
      Returns a system property or global option. System properties override global options.
      Parameters:
      name - name of the option
      Returns:
      global option
    • entries

      public static Set<Map.Entry<String,String>> entries()
      Returns all global options and system properties. System properties override global options.
      Returns:
      entry set
    • setSystem

      public static void setSystem(String name, String value)
      Sets a system property if it has not been set before.
      Parameters:
      name - name of the property
      value - value