Interface ConfigurationParameter

All Superinterfaces:
Cloneable, MetaDataObject, Serializable, XMLizable
All Known Implementing Classes:
ConfigurationParameter_impl

public interface ConfigurationParameter extends MetaDataObject
Completely specifies a configuration parameter on a UIMA resource.

A configuration parameter consists of the following fields:

  • Name
  • Description
  • Type (String, Boolean, Integer, Long, Float or Double)
  • Is the parameter multi-valued?
  • Is a value mandatory?
  • Overrides (see below)

This interface does not provide access to the value of the parameter - that is a separate piece of metadata associated with the resource.

In an aggregate resource, configuration parameters may override component resources' parameters. This is done by the overrides property. Overrides should always be specified for aggregate resources. If no overrides are specified, the default behavior is to override any parameter with the same name in any component resource. However, this usage is discouraged and will generate a warning in the log file; it exists for backwards compatibility purposes.

As with all MetaDataObjects, a ConfigurationParameter may or may not be modifiable. An application can find out by calling the MetaDataObject.isModifiable() method.

  • Field Details

    • TYPE_STRING

      static final String TYPE_STRING
      Identifies the String data type. Values of the parameter will be of type java.lang.String.
      See Also:
    • TYPE_BOOLEAN

      static final String TYPE_BOOLEAN
      Identifies the Boolean data type. Values of the parameter will be of type java.lang.Boolean.
      See Also:
    • TYPE_INTEGER

      static final String TYPE_INTEGER
      Identifies the Integer data type. Values of the parameter will be of type java.lang.Integer.
      See Also:
    • TYPE_LONG

      static final String TYPE_LONG
      Identifies the Long data type. Values of the parameter will be of type java.lang.Long.
      See Also:
    • TYPE_FLOAT

      static final String TYPE_FLOAT
      Identifies the Float data type. Values of the parameter will be of type java.lang.Float.
      See Also:
    • TYPE_DOUBLE

      static final String TYPE_DOUBLE
      Identifies the Double data type. Values of the parameter will be of type java.lang.Double.
      See Also:
  • Method Details

    • getName

      String getName()
      Retrieves the name of this configuration parameter.
      Returns:
      the name of this configuration parameter.
    • setName

      void setName(String aName)
      Sets the name of this configuration parameter.
      Parameters:
      aName - the name of this configuration parameter.
      Throws:
      UIMA_UnsupportedOperationException - if this object is not modifiable
    • getExternalOverrideName

      String getExternalOverrideName()
      Retrieves the external name of this configuration parameter.
      Returns:
      the external name of this configuration parameter.
    • setExternalOverrideName

      void setExternalOverrideName(String aExternalOverrideName)
      Sets the external name of this configuration parameter.
      Parameters:
      aExternalOverrideName - the external name of this configuration parameter.
      Throws:
      UIMA_UnsupportedOperationException - if this object is not modifiable
    • getDescription

      String getDescription()
      Retrieves the description of this configuration parameter.
      Returns:
      the description of this configuration parameter.
    • setDescription

      void setDescription(String aDescription)
      Sets the description of this configuration parameter.
      Parameters:
      aDescription - the description of this configuration parameter.
      Throws:
      UIMA_UnsupportedOperationException - if this object is not modifiable
    • getType

      String getType()
      Retrieves the data type of this configuration parameter.
      Returns:
      the data type of this configuration parameter. This will be one of the TYPE constants defined on this interface.
    • setType

      void setType(String aType)
      Sets the data type of this configuration parameter.
      Parameters:
      aType - the data type of this configuration parameter. This must be one of the TYPE constants defined on this interface.
      Throws:
      UIMA_IllegalArgumentException - if aType is not a valid data type defined by a TYPE constant on this interface.
      UIMA_UnsupportedOperationException - if this object is not modifiable
    • isMultiValued

      boolean isMultiValued()
      Retrieves whether this parameter is multi-valued. Multi-valued parameters take an array of values, each of which must be of the appropriate data type.
      Returns:
      true if and only if this parameter is multi-valued.
    • setMultiValued

      void setMultiValued(boolean aMultiValued)
      Sets whether this parameter is multi-valued. Multi-valued parameters take an array of values, each of which must be of the appropriate data type.
      Parameters:
      aMultiValued - true if and only if this parameter is multi-valued.
      Throws:
      UIMA_UnsupportedOperationException - if this object is not modifiable
    • isMandatory

      boolean isMandatory()
      Retrieves whether this parameter is mandatory.
      Returns:
      true if and only if this parameter is mandatory.
    • setMandatory

      void setMandatory(boolean aMandatory)
      Sets whether this parameter is mandatory.
      Parameters:
      aMandatory - true if and only if this parameter is mandatory.
      Throws:
      UIMA_UnsupportedOperationException - if this object is not modifiable
    • getOverrides

      String[] getOverrides()
      Gets the parameters that are this parameter overrides. This is used for aggregate resources only. Overrides are expressed as strings of the form componentName/parameterName. For example the overrides annotator1/parameter1 would override the parameter named parameter1 within the component named annotator1.
      Returns:
      the parameters this this parameter overrides
    • setOverrides

      void setOverrides(String[] aOverrides)
      Sets the parameters that are this parameter overrides. This is used for aggregate resources only. Overrides are expressed as strings of the form componentName/parameterName. For example the overrides annotator1/parameter1 would override the parameter named parameter1 within the component named annotator1.
      Parameters:
      aOverrides - the parameters this this parameter overrides
    • addOverride

      void addOverride(String aOverride)
      Adds an override to this configuration parameter.
      Parameters:
      aOverride - the override to add
      Throws:
      UIMA_UnsupportedOperationException - if this object is not modifiable
      See Also:
    • removeOverride

      void removeOverride(String aOverride)
      Removes an override from this configuration parameter.
      Parameters:
      aOverride - the override to remove. Must equal (via the equals() method) one of the overrides on this parameter, or this method will do nothing.
      Throws:
      UIMA_UnsupportedOperationException - if this object is not modifiable
      See Also: