Package org.basex.util
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-23, BSD License, Christian Gruen
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
CASE
Respect lower/upper case when doing file comparisons.static String
DBPREFIX
Prefix for project specific options.static boolean
debug
Debug mode.static String
ENCODING
Returns the system's default encoding.static boolean
gui
GUI mode.static String
HOMEDIR
Project home directory.static String
language
Language (applied after restart).static URL
LOCATION
Application URL.static boolean
MAC
Flag denoting if OS belongs to Mac family.static String
NAME
Project name.static String
NL
System-specific newline string.static String
PATH
System property for specifying database home directory.static String
PROJECT
Project name.static String
TEMPDIR
System's temporary directory.static String
VERSION
Code version (may contain major, minor and optional patch number).static boolean
WIN
Flag denoting if OS belongs to Windows family.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
clear()
Removes all global options.static Set<Map.Entry<String,String>>
entries()
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.
-
-
-
Field Detail
-
NAME
public static final String NAME
Project name.- See Also:
- Constant Field Values
-
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.
-
DBPREFIX
public static final String DBPREFIX
Prefix for project specific options.- See Also:
- Constant Field Values
-
PATH
public static final String PATH
System property for specifying database home directory.- See Also:
- Constant Field Values
-
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).
-
debug
public static boolean debug
Debug mode.
-
gui
public static boolean gui
GUI mode.
-
-
Method Detail
-
put
public static void put(Option<?> option, String value)
Sets a global option.- Parameters:
option
- optionvalue
- value
-
put
public static void put(String name, String value)
Sets a global option.- Parameters:
name
- name of the optionvalue
- 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
-
-