it.uniroma2.art.owlart.models.conf
Interface ModelConfiguration

All Known Subinterfaces:
PersistenceModelConfiguration
All Known Implementing Classes:
ModelConfigurationImpl, RemoteModelConfigurationImpl

public interface ModelConfiguration


Method Summary
 java.util.Collection<java.lang.String> getConfigurationParameters()
          returns all the parameters of the implementing ModelConfiguration subclass, which have been annotated as ModelConfigurationParameter
 java.lang.String getParameterContentType(java.lang.String parID)
          get the expected type of content for the parameter.
 java.lang.String getParameterDescription(java.lang.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
 java.lang.Object getParameterValue(java.lang.String id)
          gets the value of a parameter previously set on this configuration
 java.lang.String getShortName()
           
 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(java.lang.String parID)
           
 void loadParameters(java.io.File propertyFile)
          invokes setParameter(String, Object) on each of the parameter/value pairs found in propertyFile
 void setParameter(java.lang.String id, java.lang.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(java.util.Properties properties)
          invokes setParameter(String, Object) on each of the parameter/value pairs found in properties
 void storeParameters(java.io.File propertyFile)
          stores the parameters of this configuration in file propertyFile
 

Method Detail

getConfigurationParameters

java.util.Collection<java.lang.String> getConfigurationParameters()
returns all the parameters of the implementing ModelConfiguration subclass, which have been annotated as ModelConfigurationParameter

Returns:

getParameterValue

java.lang.Object getParameterValue(java.lang.String id)
                                   throws ConfParameterNotFoundException
gets the value of a parameter previously set on this configuration

Parameters:
id -
Returns:
Throws:
ConfParameterNotFoundException

setParameter

void setParameter(java.lang.String id,
                  java.lang.Object value)
                  throws BadConfigurationException
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. Supported types are now:

Parameters:
id -
value -
Throws:
BadConfigurationException

loadParameters

void loadParameters(java.io.File propertyFile)
                    throws BadConfigurationException,
                           java.io.IOException
invokes setParameter(String, Object) on each of the parameter/value pairs found in propertyFile

Parameters:
propertyFile -
Throws:
BadConfigurationException
java.io.IOException

setParameters

void setParameters(java.util.Properties properties)
                   throws BadConfigurationException
invokes setParameter(String, Object) on each of the parameter/value pairs found in properties

Parameters:
properties -
Throws:
BadConfigurationException

storeParameters

void storeParameters(java.io.File propertyFile)
                     throws java.io.IOException,
                            BadConfigurationException
stores the parameters of this configuration in file propertyFile

Parameters:
propertyFile -
Throws:
java.io.IOException
BadConfigurationException

getParameterContentType

java.lang.String getParameterContentType(java.lang.String parID)
                                         throws ConfParameterNotFoundException
get the expected type of content for the parameter. Can be used by external tools to drive the acquisition of that value or to check

Parameters:
parID -
Returns:
Throws:
ConfParameterNotFoundException

hasRequiredParameters

boolean hasRequiredParameters()
tells if this ModelConfiguration needs to be explicitly set by the user or if it can be used in its default settings

Returns:

isRequiredParameter

boolean isRequiredParameter(java.lang.String parID)
                            throws ConfParameterNotFoundException
Throws:
ConfParameterNotFoundException

getParameterDescription

java.lang.String getParameterDescription(java.lang.String id)
                                         throws ConfParameterNotFoundException
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

Parameters:
id -
Returns:
Throws:
ConfParameterNotFoundException

getShortName

java.lang.String getShortName()
Returns:
a humanly understandable short name representing the type of this model configuration


Copyright © 2011 ART Group, University of Rome, Tor Vergata. All Rights Reserved.