|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.ie.stemming.examples.ConfigurationManager
public class ConfigurationManager
Provides access to a configuration file located in the users home directory.
The intend is to support machine-dependent settings such as pathnames for
different aitools modules. Usually the configuration file is located in
$HOME/.aitools/module/config
The configuration file is considered as properties file as created by
the java.util.Properties class.
Constructor Summary | |
---|---|
ConfigurationManager()
|
Method Summary | |
---|---|
java.lang.String |
getConfigFileName()
Returns the absolute pathname to the configuration file. |
java.util.Properties |
getProperties()
Loads and returns the properties provided by this configuration manager. |
boolean |
init(java.lang.String moduleName,
java.lang.String configFileName)
Initializes the configuration manager and checks if the configuration file specified by the given parameters exists. |
boolean |
init(java.lang.String moduleName,
java.lang.String configFileName,
java.util.Properties p)
Initializes the configuration manager and creates a configuration file with the contents given by p. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationManager()
Method Detail |
---|
public java.lang.String getConfigFileName()
public boolean init(java.lang.String moduleName, java.lang.String configFileName) throws java.io.IOException
moduleName
- name for the parent directory of the configuration fileconfigFileName
- filename for the configuration file
java.io.IOException
public boolean init(java.lang.String moduleName, java.lang.String configFileName, java.util.Properties p) throws java.io.IOException
moduleName
- name for the parent directory of the configuration fileconfigFileName
- filename for the configuration filep
- properties to store in the newly created configuration file
java.io.IOException
public java.util.Properties getProperties() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.io.IOException
args
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |