org.apache.uima.resource.metadata

## Interface ConfigurationParameter

- All Superinterfaces:
    Cloneable, MetaDataObject, Serializable, XMLizable

      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, or Float)
  - 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 `MetaDataObject`s, a `ConfigurationParameter` may or may not be modifiable. An application can find out by calling the `MetaDataObject.isModifiable()` method.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TYPE_BOOLEAN` Identifies the Boolean data type.
    `static String` | `TYPE_FLOAT` Identifies the Float data type.
    `static String` | `TYPE_INTEGER` Identifies the Integer data type.
    `static String` | `TYPE_STRING` Identifies the String data type.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOverride(String aOverride)` Adds an override to this configuration parameter.
    `String` | `getDescription()` Retrieves the description of this configuration parameter.
    `String` | `getExternalOverrideName()` Retrieves the external name of this configuration parameter.
    `String` | `getName()` Retrieves the name of this configuration parameter.
    `String[]` | `getOverrides()` Gets the parameters that are this parameter overrides.
    `String` | `getType()` Retrieves the data type of this configuration parameter.
    `boolean` | `isMandatory()` Retrieves whether this parameter is mandatory.
    `boolean` | `isMultiValued()` Retrieves whether this parameter is multi-valued.
    `void` | `removeOverride(String aOverride)` Removes an override from this configuration parameter.
    `void` | `setDescription(String aDescription)` Sets the description of this configuration parameter.
    `void` | `setExternalOverrideName(String aExternalOverrideName)` Sets the external name of this configuration parameter.
    `void` | `setMandatory(boolean aMandatory)` Sets whether this parameter is mandatory.
    `void` | `setMultiValued(boolean aMultiValued)` Sets whether this parameter is multi-valued.
    `void` | `setName(String aName)` Sets the name of this configuration parameter.
    `void` | `setOverrides(String[] aOverrides)` Sets the parameters that are this parameter overrides.
    `void` | `setType(String aType)` Sets the data type of this configuration parameter.

    - ### Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject

      `clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl`

    - ### Methods inherited from interface org.apache.uima.util.XMLizable

      `buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML`

- - ### Field Detail

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

  - ### Method Detail

    - #### 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:
        `setOverrides(String[])`

    - #### 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:
        `setOverrides(String[])`

Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.