Package cz.cvut.kbss.ontodriver.config
Class DriverConfiguration
java.lang.Object
cz.cvut.kbss.ontodriver.config.DriverConfiguration
Holds configuration of the OntoDriver.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfiguration
(Map<String, String> properties, Collection<ConfigurationParameter> parameters) Loads configuration of parameters specified byparameters
from the provided properties map.boolean
getProperty
(ConfigurationParameter property) Gets value of the specified property.int
getProperty
(ConfigurationParameter property, int defaultValue) Gets integer value of the specified property or the default value, if the property is not set.getProperty
(ConfigurationParameter property, String defaultValue) Gets value of the specified property or the default value, if the property is not set.int
hashCode()
boolean
is
(ConfigurationParameter property) Returns value of the specified property as boolean.boolean
isSet
(ConfigurationParameter property) Checks whether the specified property is set in this configuration.void
setProperty
(ConfigurationParameter property, String value) Sets configuration of the specified parameter to the specified value.
-
Constructor Details
-
DriverConfiguration
-
-
Method Details
-
addConfiguration
public void addConfiguration(Map<String, String> properties, Collection<ConfigurationParameter> parameters) Loads configuration of parameters specified byparameters
from the provided properties map.- Parameters:
properties
- Map of configuration valuesparameters
- Parameters to extract from the map
-
setProperty
Sets configuration of the specified parameter to the specified value.Overrides any previous setting.
- Parameters:
property
- Parametervalue
- Value
-
getProperty
Gets value of the specified property.- Parameters:
property
- Parameter- Returns:
- Value of the property or
null
, if it is not set
-
getProperty
Gets value of the specified property or the default value, if the property is not set.- Parameters:
property
- ParameterdefaultValue
- Value to return if the property is not set- Returns:
- Value of the property or
defaultValue
, if it is not set
-
getProperty
Gets integer value of the specified property or the default value, if the property is not set.- Parameters:
property
- ParameterdefaultValue
- Value to return if the property is not set- Returns:
- Value of the property or
defaultValue
, if it is not set - Throws:
IllegalArgumentException
- If the configured property value is not an integer
-
is
Returns value of the specified property as boolean.If the property is not configured,
false
is returned.- Parameters:
property
- Parameter- Returns:
- Property value (false for unknown)
-
isSet
Checks whether the specified property is set in this configuration.- Parameters:
property
- The property to check- Returns:
- Whether the specified property is set here
-
getStorageProperties
-
equals
-
hashCode
public int hashCode()
-