public abstract class ConfigGroup extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
ConfigGroup.EnumDbConnectionType
Type of database.
|
Modifier and Type | Field and Description |
---|---|
protected static String |
CLEAN_DB_NAME
Database-name prefix for configuration values related to the clean database.
|
protected static String |
DIRTY_DB_NAME
Database-name prefix for configuration values related to the dirty database.
|
protected static String |
NAME_DELIMITER
The delimiter between the group name and property name in the properties.
|
Constructor and Description |
---|
ConfigGroup() |
Modifier and Type | Method and Description |
---|---|
protected static JDBCConnectionCredentials |
loadJDBCConnectionCredentials(Properties properties,
ConfigGroup.EnumDbConnectionType dbType)
Extracts JDBC configuration values for the database given by its name
from the given Properties instance.
|
protected static <T> T |
loadParam(Properties properties,
String paramName,
ParameterFormat<T> format)
Loads the value of the parameter denoted by the represented group name
and the given param-name and converts according to the given format.
|
protected static SparqlEndpointConnectionCredentials |
loadSparqlEndpointConnectionCredentials(Properties properties,
ConfigGroup.EnumDbConnectionType dbType,
boolean requireAuth)
Extracts SPARQL Endpoint configuration values for the database given by its name
from the given Properties instance.
|
protected static final String NAME_DELIMITER
protected static final String DIRTY_DB_NAME
protected static final String CLEAN_DB_NAME
protected static <T> T loadParam(Properties properties, String paramName, ParameterFormat<T> format) throws ParameterNotAvailableException, IllegalParameterFormatException
properties
- paramName
- format
- ParameterNotAvailableException
- if the requested parameter does not occur in the
given properties instanceIllegalParameterFormatException
- if the requested parameter occurs but cannot
be converted to the given typeprotected static JDBCConnectionCredentials loadJDBCConnectionCredentials(Properties properties, ConfigGroup.EnumDbConnectionType dbType) throws ParameterNotAvailableException, IllegalParameterFormatException
properties
- dbName
- ParameterNotAvailableException
IllegalParameterFormatException
protected static SparqlEndpointConnectionCredentials loadSparqlEndpointConnectionCredentials(Properties properties, ConfigGroup.EnumDbConnectionType dbType, boolean requireAuth) throws ParameterNotAvailableException, IllegalParameterFormatException
properties
- dbName
- requireAuth
- if false, only endpoint URL is loaded, otherwise username and password are also requiredParameterNotAvailableException
IllegalParameterFormatException
Copyright © 2013. All Rights Reserved.