org.jgap.data.config
Class ConfigFileReader
- java.lang.Object
-
- org.jgap.data.config.ConfigFileReader
-
public class ConfigFileReader extends java.lang.ObjectThis is a Singleton Helper class to read a JGAP config file and provide a simple interface to the config properties.- Since:
- 2.3
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetValue(java.lang.String a_name)Retrieve the value for the property with the name as in param name.java.util.ListgetValues(java.lang.String a_name)Retrieve the values for the property with the name as in param name.static ConfigFileReaderinstance()Method to create and access the Singleton ConfigFileReader instance.voidsetFileName(java.lang.String a_fileName)Set the config file to load from.voidsetNS(java.lang.String a_ns)Set the namespace for the properties that are being read from the config file at this point.
-
-
-
Method Detail
-
instance
public static ConfigFileReader instance()
Method to create and access the Singleton ConfigFileReader instance.- Returns:
- instance of the ConfigFileReader
- Since:
- 2.3
-
getValue
public java.lang.String getValue(java.lang.String a_name)
Retrieve the value for the property with the name as in param name.- Parameters:
a_name- name of the property of which the value is required- Returns:
- value for the property with the name as in param name, null if property not found
- Since:
- 2.3
-
getValues
public java.util.List getValues(java.lang.String a_name)
Retrieve the values for the property with the name as in param name.- Parameters:
a_name- the name of the property of which the value is required- Returns:
- ArrayList of Strings with values for the property with the name as in param name, null if property not found
-
setNS
public void setNS(java.lang.String a_ns)
Set the namespace for the properties that are being read from the config file at this point.- Parameters:
a_ns- namespace for the properties being read
-
setFileName
public void setFileName(java.lang.String a_fileName) throws ConfigExceptionSet the config file to load from. Everytime this method is called, properties are reloaded from the config file.- Parameters:
a_fileName- Name of the config file.- Throws:
ConfigException- Since:
- 2.3
-
-
DMelt 3.0 © DataMelt by jWork.ORG