Class DriverConfiguration

java.lang.Object
cz.cvut.kbss.ontodriver.config.DriverConfiguration

public final class DriverConfiguration extends Object
Holds configuration of the OntoDriver.
  • Constructor Details

  • Method Details

    • addConfiguration

      public void addConfiguration(Map<String,String> properties, Collection<ConfigurationParameter> parameters)
      Loads configuration of parameters specified by parameters from the provided properties map.
      Parameters:
      properties - Map of configuration values
      parameters - Parameters to extract from the map
    • setProperty

      public void setProperty(ConfigurationParameter property, String value)
      Sets configuration of the specified parameter to the specified value.

      Overrides any previous setting.

      Parameters:
      property - Parameter
      value - Value
    • getProperty

      public String getProperty(ConfigurationParameter property)
      Gets value of the specified property.
      Parameters:
      property - Parameter
      Returns:
      Value of the property or null, if it is not set
    • getProperty

      public String getProperty(ConfigurationParameter property, String defaultValue)
      Gets value of the specified property or the default value, if the property is not set.
      Parameters:
      property - Parameter
      defaultValue - Value to return if the property is not set
      Returns:
      Value of the property or defaultValue, if it is not set
    • getProperty

      public int getProperty(ConfigurationParameter property, int defaultValue)
      Gets integer value of the specified property or the default value, if the property is not set.
      Parameters:
      property - Parameter
      defaultValue - 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

      public boolean is(ConfigurationParameter property)
      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

      public boolean isSet(ConfigurationParameter property)
      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

      public OntologyStorageProperties getStorageProperties()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object