public abstract class ModelConfigurationImpl extends Object implements ModelConfiguration
Modifier | Constructor and Description |
---|---|
protected |
ModelConfigurationImpl() |
protected |
ModelConfigurationImpl(File propertyFile) |
Modifier and Type | Method and Description |
---|---|
Collection<String> |
getConfigurationParameters()
returns all the parameters of the implementing ModelConfiguration subclass, which have been annotated
as
ModelConfigurationParameter |
String |
getParameterContentType(String parID)
get the expected type of content for the parameter.
|
String |
getParameterDescription(String id)
this method is useful when OWL ART API are embedded inside tools presenting list of configuration
parameters for being set by the users, to provide hints for the user on which kind of values should be
used to fill them
|
Object |
getParameterValue(String id)
gets the value of a parameter previously set on this configuration
|
boolean |
hasRequiredParameters()
tells if this ModelConfiguration needs to be explicitly set by the user or if it can be used in its
default settings
|
boolean |
isRequiredParameter(String parID) |
void |
loadParameters(File propertyFile)
invokes
ModelConfiguration.setParameter(String, Object) on each of the parameter/value pairs found in
propertyFile |
void |
setParameter(String id,
Object value)
sets the value of the Configuration Parameter to
value Note that it is possible to pass the value both with the proper type, if it is known in advance, as well with a generic String, which will be evaluated and converted to the appropriate type. |
void |
setParameters(Properties props)
invokes
ModelConfiguration.setParameter(String, Object) on each of the parameter/value pairs found in
properties |
void |
storeParameters(File propertyFile)
stores the parameters of this configuration in file
propertyFile |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getShortName
protected ModelConfigurationImpl()
protected ModelConfigurationImpl(File propertyFile) throws IOException, BadConfigurationException
IOException
BadConfigurationException
public Collection<String> getConfigurationParameters()
ModelConfiguration
ModelConfigurationParameter
getConfigurationParameters
in interface ModelConfiguration
public Object getParameterValue(String id) throws ConfParameterNotFoundException
ModelConfiguration
getParameterValue
in interface ModelConfiguration
ConfParameterNotFoundException
public void setParameter(String id, Object value) throws BadConfigurationException
ModelConfiguration
value
setParameter
in interface ModelConfiguration
BadConfigurationException
public void setParameters(Properties props) throws BadConfigurationException
ModelConfiguration
ModelConfiguration.setParameter(String, Object)
on each of the parameter/value pairs found in
properties
setParameters
in interface ModelConfiguration
BadConfigurationException
public void loadParameters(File propertyFile) throws BadConfigurationException, IOException
ModelConfiguration
ModelConfiguration.setParameter(String, Object)
on each of the parameter/value pairs found in
propertyFile
loadParameters
in interface ModelConfiguration
BadConfigurationException
IOException
public void storeParameters(File propertyFile) throws IOException, BadConfigurationException
ModelConfiguration
propertyFile
storeParameters
in interface ModelConfiguration
IOException
BadConfigurationException
public String getParameterContentType(String parID) throws ConfParameterNotFoundException
ModelConfiguration
getParameterContentType
in interface ModelConfiguration
ConfParameterNotFoundException
public boolean isRequiredParameter(String parID) throws ConfParameterNotFoundException
isRequiredParameter
in interface ModelConfiguration
ConfParameterNotFoundException
public boolean hasRequiredParameters()
ModelConfiguration
hasRequiredParameters
in interface ModelConfiguration
public String getParameterDescription(String id) throws ConfParameterNotFoundException
ModelConfiguration
getParameterDescription
in interface ModelConfiguration
ConfParameterNotFoundException
Copyright © 2015 ART Group, University of Rome, Tor Vergata. All Rights Reserved.