public class MTBEnvironmentConfig
extends de.unihalle.informatik.Alida.helpers.ALDEnvironmentConfig
Every MiToBo operator and also every class can define properties. To ensure a certain structure of the properties and avoid chaos in property names the properties should commit to the following convention: mitobo.operatorname.property The corresponding environment variable will then be MITOBO_OPERATORNAME_PROPERTY following common Unix/Linux conventions.
Constructor and Description |
---|
MTBEnvironmentConfig() |
Modifier and Type | Method and Description |
---|---|
static String |
getConfigValue(String _operator,
String _envVariable)
This function reads out the value of a given environment property.
|
static String |
getEnvVarValue(String _operator,
String _envVariable)
This function reads out the value of a given environment variable.
|
static String |
getImageJPropValue(String plugin,
String envVariable)
This function reads out the value of a given ImageJ preference.
|
static String |
getJVMPropValue(String _operator,
String _envVariable)
This function reads out the value of a given JVM property.
|
static void |
setImageJPref(String plugin,
String envVar,
String val)
This functions sets a given property to the specified value.
|
public static String getImageJPropValue(String plugin, String envVariable)
plugin
- Name of plugin, ignored if null.envVariable
- Name of the preference.public static void setImageJPref(String plugin, String envVar, String val)
The properties are saved to ~/.imagej/Prefs.txt when the ImageJ gui is properly closed (not killed!) by the user. Note that already defined property are simply overwritten with new values if the method is called on existing properties.
plugin
- Name of Mitobo plugin, ignored if null.envVar
- Name of property.val
- Value of property.public static String getConfigValue(String _operator, String _envVariable)
Here the default prefix "mitobo" is assumed. It is combined with operator and environment variable name in this order.
_operator
- Name of the operator._envVariable
- Name of the property.public static String getJVMPropValue(String _operator, String _envVariable)
Default prefix is "mitobo".
_operator
- Name of operator, ignored if null._envVariable
- Name of the property.public static String getEnvVarValue(String _operator, String _envVariable)
Default prefix is "mitobo".
_operator
- Name of operator, ignored if null._envVariable
- Name of the variable.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.