org.apache.uima.resource.metadata.impl

## Class ConfigurationParameter_impl

- java.lang.Object
- - org.apache.uima.resource.metadata.impl.MetaDataObject_impl
  - - org.apache.uima.resource.metadata.impl.ConfigurationParameter_impl

- All Implemented Interfaces:
    Serializable, Cloneable, ConfigurationParameter, MetaDataObject, XMLizable

      public class ConfigurationParameter_impl
      extends MetaDataObject_impl
      implements ConfigurationParameter

  Reference implementation of `ConfigurationParameter`.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl

      `MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer`

  - ### Field Summary

    - ### Fields inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl

      `serialContext`

    - ### Fields inherited from interface org.apache.uima.resource.metadata.ConfigurationParameter

      `TYPE_BOOLEAN, TYPE_FLOAT, TYPE_INTEGER, TYPE_STRING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigurationParameter_impl()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete 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.
    `protected XmlizationInfo` | `getXmlizationInfo()` To be implemented by subclasses to return information describing how to represent this object in XML.
    `boolean` | `isMandatory()` Retrieves whether this parameter is mandatory.
    `boolean` | `isMultiValued()` Retrieves whether this parameter is multi-valued.
    `protected static boolean` | `isValidDataTypeName(Object aTypeName)` Determines whether the given String is a valid name for a data type.
    `protected void` | `readArrayPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo, Class aPropClass, Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions)` Overriden to allow both "param" and "parameter" as the array element tags.
    `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.
    `static boolean` | `typeMatch(Class aClass, String aTypeName, boolean aMultiValued)` Determines whether the given Java class is an appropriate value for a parameter with the specified type.

    - ### Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl

      `buildFromXMLElement, buildFromXMLElement, clone, equals, getAdditionalAttributes, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, listAttributes, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElement`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### 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`

- - ### Constructor Detail

    - #### ConfigurationParameter_impl

          public ConfigurationParameter_impl()

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `ConfigurationParameter`
      Retrieves the name of this configuration parameter.
      Specified by:
        `getName` in interface `ConfigurationParameter`
      Returns:
        the name of this configuration parameter.
      See Also:
        `ConfigurationParameter.getName()`

    - #### setName

          public void setName(String aName)

      Description copied from interface: `ConfigurationParameter`
      Sets the name of this configuration parameter.
      Specified by:
        `setName` in interface `ConfigurationParameter`
      Parameters:
        `aName` - the name of this configuration parameter.
      See Also:
        `ConfigurationParameter.setName(String)`

    - #### getExternalOverrideName

          public String getExternalOverrideName()

      Description copied from interface: `ConfigurationParameter`
      Retrieves the external name of this configuration parameter.
      Specified by:
        `getExternalOverrideName` in interface `ConfigurationParameter`
      Returns:
        the external name of this configuration parameter.
      See Also:
        `ConfigurationParameter.getExternalOverrideName()`

    - #### setExternalOverrideName

          public void setExternalOverrideName(String aExternalOverrideName)

      Description copied from interface: `ConfigurationParameter`
      Sets the external name of this configuration parameter.
      Specified by:
        `setExternalOverrideName` in interface `ConfigurationParameter`
      Parameters:
        `aExternalOverrideName` - the external name of this configuration parameter.
      See Also:
        `ConfigurationParameter.setExternalOverrideName(String)`

    - #### getDescription

          public String getDescription()

      Description copied from interface: `ConfigurationParameter`
      Retrieves the description of this configuration parameter.
      Specified by:
        `getDescription` in interface `ConfigurationParameter`
      Returns:
        the description of this configuration parameter.
      See Also:
        `ConfigurationParameter.getDescription()`

    - #### setDescription

          public void setDescription(String aDescription)

      Description copied from interface: `ConfigurationParameter`
      Sets the description of this configuration parameter.
      Specified by:
        `setDescription` in interface `ConfigurationParameter`
      Parameters:
        `aDescription` - the description of this configuration parameter.
      See Also:
        `ConfigurationParameter.setDescription(String)`

    - #### getType

          public String getType()

      Description copied from interface: `ConfigurationParameter`
      Retrieves the data type of this configuration parameter.
      Specified by:
        `getType` in interface `ConfigurationParameter`
      Returns:
        the data type of this configuration parameter. This will be one of the TYPE constants defined on this interface.
      See Also:
        `ConfigurationParameter.getType()`

    - #### setType

          public void setType(String aType)
                       throws UIMA_IllegalArgumentException

      Description copied from interface: `ConfigurationParameter`
      Sets the data type of this configuration parameter.
      Specified by:
        `setType` in interface `ConfigurationParameter`
      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.
      See Also:
        `ConfigurationParameter.setType(String)`

    - #### isMultiValued

          public boolean isMultiValued()

      Description copied from interface: `ConfigurationParameter`
      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.
      Specified by:
        `isMultiValued` in interface `ConfigurationParameter`
      Returns:
        true if and only if this parameter is multi-valued.
      See Also:
        `ConfigurationParameter.isMultiValued()`

    - #### setMultiValued

          public void setMultiValued(boolean aMultiValued)

      Description copied from interface: `ConfigurationParameter`
      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.
      Specified by:
        `setMultiValued` in interface `ConfigurationParameter`
      Parameters:
        `aMultiValued` - true if and only if this parameter is multi-valued.
      See Also:
        `ConfigurationParameter.setMultiValued(boolean)`

    - #### isMandatory

          public boolean isMandatory()

      Description copied from interface: `ConfigurationParameter`
      Retrieves whether this parameter is mandatory.
      Specified by:
        `isMandatory` in interface `ConfigurationParameter`
      Returns:
        true if and only if this parameter is mandatory.
      See Also:
        `ConfigurationParameter.isMandatory()`

    - #### setMandatory

          public void setMandatory(boolean aMandatory)

      Description copied from interface: `ConfigurationParameter`
      Sets whether this parameter is mandatory.
      Specified by:
        `setMandatory` in interface `ConfigurationParameter`
      Parameters:
        `aMandatory` - true if and only if this parameter is mandatory.
      See Also:
        `ConfigurationParameter.setMandatory(boolean)`

    - #### getOverrides

          public String[] getOverrides()

      Description copied from interface: `ConfigurationParameter`
      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`.
      Specified by:
        `getOverrides` in interface `ConfigurationParameter`
      Returns:
        the parameters this this parameter overrides

    - #### setOverrides

          public void setOverrides(String[] aOverrides)

      Description copied from interface: `ConfigurationParameter`
      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`.
      Specified by:
        `setOverrides` in interface `ConfigurationParameter`
      Parameters:
        `aOverrides` - the parameters this this parameter overrides

    - #### addOverride

          public void addOverride(String aOverride)

      Description copied from interface: `ConfigurationParameter`
      Adds an override to this configuration parameter.
      Specified by:
        `addOverride` in interface `ConfigurationParameter`
      Parameters:
        `aOverride` - the override to add
      See Also:
        `ConfigurationParameter.setOverrides(String[])`

    - #### removeOverride

          public void removeOverride(String aOverride)

      Description copied from interface: `ConfigurationParameter`
      Removes an override from this configuration parameter.
      Specified by:
        `removeOverride` in interface `ConfigurationParameter`
      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.
      See Also:
        `ConfigurationParameter.setOverrides(String[])`

    - #### typeMatch

          public static boolean typeMatch(Class aClass,
                                          String aTypeName,
                                          boolean aMultiValued)

      Determines whether the given Java class is an appropriate value for a parameter with the specified type. For example, if the parameter's type is "Integer", then java.lang.Integer is a match but java.lang.String is not.
      Parameters:
        `aClass` - class to check
        `aTypeName` - configuration parameter type, as defined by one of the TYPE constants on the `ConfigurationParameter` interface.
        `aMultiValued` - true if and only if the configuration parameter is multi-valued. If true, `aClass` is expected to be an array.
      Returns:
        true if and only if an object of class `aClass` can be legally assigned to a parameter described by `aTypeName` and `aMultiValued`.

    - #### isValidDataTypeName

          protected static boolean isValidDataTypeName(Object aTypeName)

      Determines whether the given String is a valid name for a data type. Valid data type names are legal arguments to the `setType(String)` method, and are defined by the TYPE constants on the `ConfigurationParameter` interface.
      Parameters:
        `aTypeName` - an Object to test
      Returns:
        true if and only if `aTypeName` is a `String` that is a valid data type name.

    - #### readArrayPropertyValueFromXMLElement

          protected void readArrayPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo,
                                                              Class aPropClass,
                                                              Element aElement,
                                                              XMLParser aParser,
                                                              XMLParser.ParsingOptions aOptions)
                                                       throws InvalidXMLException

      Overriden to allow both "param" and "parameter" as the array element tags. (For historical reasons.)
      Overrides:
        `readArrayPropertyValueFromXMLElement` in class `MetaDataObject_impl`
      Parameters:
        `aPropXmlInfo` - information about the property to read
        `aPropClass` - class of the property's value
        `aElement` - DOM element representing the entire array
        `aParser` - parser to use to construct complex values
        `aOptions` - option settings
      Throws:
        `InvalidXMLException` - -

    - #### getXmlizationInfo

          protected XmlizationInfo getXmlizationInfo()

      Description copied from class: `MetaDataObject_impl`
      To be implemented by subclasses to return information describing how to represent this object in XML.
      Specified by:
        `getXmlizationInfo` in class `MetaDataObject_impl`
      Returns:
        information defining this object's XML representation

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