public class ConfigurationTree extends Object
Modifier and Type | Field and Description |
---|---|
private String |
configDir
Base directory on the file system associated with the configuration
files.
|
private static org.slf4j.Logger |
LOGGER |
private DefaultMutableTreeNode |
root
Root of tree structure containing configuration data.
|
private String |
rootDir
Directory on the file system associated with the tree root.
|
Constructor and Description |
---|
ConfigurationTree(String rootDir)
Constructs a new configuration tree rooted at the given directory in the
file system.
|
ConfigurationTree(String rootDir,
String configDir)
Constructs a new configuration tree rooted at the given directory in the
file system with a custom configuration directory.
|
Modifier and Type | Method and Description |
---|---|
private DefaultMutableTreeNode |
findNode(String id,
boolean create,
String configFile)
Gets the tree node associated with the given file.
|
Configuration |
get(String id)
Retrieves the Configuration object corresponding to the given file.
|
String |
getConfigDirectory()
Returns the base directory holding the configuration files
|
String |
getRootDirectory()
Returns the toot directory holding the data
|
void |
parseConfigFile(String configFile) |
private static final org.slf4j.Logger LOGGER
private String rootDir
private String configDir
private DefaultMutableTreeNode root
public ConfigurationTree(String rootDir)
rootDir
- a string specifying the root directorypublic ConfigurationTree(String rootDir, String configDir)
rootDir
- a string specifying the root directoryconfigDir
- a string specifying the base configuration directorypublic String getRootDirectory()
public String getConfigDirectory()
public Configuration get(String id) throws IOException
IOException
public void parseConfigFile(String configFile) throws IOException
IOException
private DefaultMutableTreeNode findNode(String id, boolean create, String configFile)
Copyright © 2015 Open Microscopy Environment