public class INIConfigurations
extends org.protempa.backend.AbstractConfigurations
| Modifier and Type | Field and Description |
|---|---|
static File |
DEFAULT_DIRECTORY
The default directory for configurations (
.protempa-configs
in the user's home directory). |
static String |
DIRECTORY_SYSTEM_PROPERTY
The name of the system property (
protempa.inicommonsconfigurations.pathname) for specifying
the configuration file directory. |
| Constructor and Description |
|---|
INIConfigurations()
Creates an INI file configurations instance.
|
INIConfigurations(org.protempa.backend.BackendProvider backendProvider,
File directory)
Creates an INI file configurations instance that looks for configuration
files in the specified directory.
|
INIConfigurations(File pathname)
Creates an INI file configurations instance that looks for backend
configurations in the specified directory.
|
| Modifier and Type | Method and Description |
|---|---|
File |
getDirectory()
Returns the directory in which configuration files are expected to be
found.
|
org.protempa.backend.Configuration |
load(String configurationId) |
void |
remove(String configurationId) |
void |
save(org.protempa.backend.Configuration configuration) |
public static final File DEFAULT_DIRECTORY
.protempa-configs
in the user's home directory).public static final String DIRECTORY_SYSTEM_PROPERTY
protempa.inicommonsconfigurations.pathname) for specifying
the configuration file directory.public INIConfigurations()
pathname of null in
the one-argument constructor.public INIConfigurations(File pathname)
null, the
default directory will be used (DEFAULT_DIRECTORY).pathname - the directory containing backend configurations.public INIConfigurations(org.protempa.backend.BackendProvider backendProvider,
File directory)
null, it first looks
for a system property,
protempa.inicommonsconfigurations.pathname for a pathname.
If unspecified, it looks for configuration files in the default location
(see DEFAULT_DIRECTORY).backendProvider - the provider for loading data source, knowledge
source, algorithm source etc. backends.directory - the directory containing backend configuration files.public File getDirectory()
File.public org.protempa.backend.Configuration load(String configurationId) throws org.protempa.backend.ConfigurationsLoadException, org.protempa.backend.ConfigurationsNotFoundException
org.protempa.backend.ConfigurationsLoadExceptionorg.protempa.backend.ConfigurationsNotFoundExceptionpublic void save(org.protempa.backend.Configuration configuration)
throws org.protempa.backend.ConfigurationsSaveException
org.protempa.backend.ConfigurationsSaveExceptionpublic void remove(String configurationId) throws org.protempa.backend.ConfigurationRemoveException
org.protempa.backend.ConfigurationRemoveExceptionCopyright © 2012–2016 Emory University. All rights reserved.