org.apache.uima.resource.metadata

## Interface ConfigurationParameterDeclarations

- All Superinterfaces:
    Cloneable, MetaDataObject, Serializable, XMLizable
  All Known Implementing Classes:
    ConfigurationParameterDeclarations_impl

      public interface ConfigurationParameterDeclarations
      extends MetaDataObject

  The declarations of configuration parameters in a Resource. A Resource can either declare a single list of `ConfigurationParameter`s or a list of `ConfigurationGroup`s, where each group can contain a list of parameters. When groups are used, the Resource can also declare a list of `common parameters` shared by all groups.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SEARCH_STRATEGY_DEFAULT_FALLBACK` A value for the `searchStrategy` property indicating that if there is no value declared in a group, look in the `default group`.
    `static String` | `SEARCH_STRATEGY_LANGUAGE_FALLBACK` A value for the `searchStrategy` property that is useful when ISO language and country codes are used as configuration group names.
    `static String` | `SEARCH_STRATEGY_NONE` A value for the `searchStrategy` property indicating that there is no fallback.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCommonParameter(ConfigurationParameter aConfigurationParameter)` Adds a Configuration Parameter that is common to all groups.
    `void` | `addConfigurationGroup(ConfigurationGroup aConfigurationGroup)` Adds a Configuration Group.
    `void` | `addConfigurationParameter(ConfigurationParameter aConfigurationParameter)` Adds a Configuration Parameter that is not in any group.
    `ConfigurationParameter[]` | `getCommonParameters()` Gets the configuration parameters that are common to all groups.
    `ConfigurationGroup[]` | `getConfigurationGroupDeclarations(String aGroupName)` Gets the declarations of a named configuration group.
    `ConfigurationGroup[]` | `getConfigurationGroups()` Gets the configuration parameter groups for this Resource.
    `ConfigurationParameter` | `getConfigurationParameter(String aGroupName, String aParamName)` Gets a configuration parameter.
    `ConfigurationParameter[]` | `getConfigurationParameters()` Gets the configuration parameters for this Resource.
    `String` | `getDefaultGroupName()` Gets the name of the default configuration group.
    `String` | `getSearchStrategy()` Gets the configuration parameter search strategy.
    `void` | `removeCommonParameter(ConfigurationParameter aConfigurationParameter)` Removes an Configuration Parameter that is common to all groups.
    `void` | `removeConfigurationGroup(ConfigurationGroup aConfigurationGroup)` Removes an Configuration Group
    `void` | `removeConfigurationParameter(ConfigurationParameter aConfigurationParameter)` Removes an Configuration Parameter that is not in any group.
    `void` | `setCommonParameters(ConfigurationParameter[] aParams)` Sets the configuration parameters that are common to all groups.
    `void` | `setConfigurationGroups(ConfigurationGroup[] aGroups)` Sets the configuration parameter groups for this Resource.
    `void` | `setConfigurationParameters(ConfigurationParameter[] aParams)` Sets the configuration parameters for this Resource.
    `void` | `setDefaultGroupName(String aGroupName)` Sets the name of the default configuration group.
    `void` | `setSearchStrategy(String aStrategy)` Sets the configuration parameter search strategy.

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

    - #### SEARCH_STRATEGY_NONE

          static final String SEARCH_STRATEGY_NONE

      A value for the `searchStrategy` property indicating that there is no fallback. If a request is made for the value of a parameter in a group and there is no such value in that exact group, `null` will be returned.
      See Also:
        Constant Field Values

    - #### SEARCH_STRATEGY_DEFAULT_FALLBACK

          static final String SEARCH_STRATEGY_DEFAULT_FALLBACK

      A value for the `searchStrategy` property indicating that if there is no value declared in a group, look in the `default group`.
      See Also:
        Constant Field Values

    - #### SEARCH_STRATEGY_LANGUAGE_FALLBACK

          static final String SEARCH_STRATEGY_LANGUAGE_FALLBACK

      A value for the `searchStrategy` property that is useful when ISO language and country codes are used as configuration group names. If there is no value declared in a group, look in more general groups. The fallback sequence is `lang-country-region -%gt; lang-country -%gt; lang -%gt; default`. For example, if a request is made for the value of a parameter in the "en-GB" group and no such group exists, the value from the "en" group will be used instead.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getConfigurationParameters

          ConfigurationParameter[] getConfigurationParameters()

      Gets the configuration parameters for this Resource. This gets configuration parameters that are not defined within a group - see also `getConfigurationGroups()`.
      Returns:
        an array containing `ConfigurationParameter` objects, each of which describes a configuration parameter for this Resource.

    - #### setConfigurationParameters

          void setConfigurationParameters(ConfigurationParameter[] aParams)

      Sets the configuration parameters for this Resource. This sets the configuration parameters that are not defined within groups - see also `setConfigurationGroups(ConfigurationGroup[])`.
      Parameters:
        `aParams` - an array containing `ConfigurationParameter` objects, each of which describes a configuration parameter for this Resource.
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### addConfigurationParameter

          void addConfigurationParameter(ConfigurationParameter aConfigurationParameter)

      Adds a Configuration Parameter that is not in any group.
      Parameters:
        `aConfigurationParameter` - the Configuration Parameter to add
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### removeConfigurationParameter

          void removeConfigurationParameter(ConfigurationParameter aConfigurationParameter)

      Removes an Configuration Parameter that is not in any group.
      Parameters:
        `aConfigurationParameter` - the Configuration Parameter to remove (must be == with an ConfigurationParameter in this collection, or this method will do nothing).
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getConfigurationGroups

          ConfigurationGroup[] getConfigurationGroups()

      Gets the configuration parameter groups for this Resource.
      Returns:
        an array containing `ConfigurationGroup` objects, each of which describes a configuration parameter group for this Resource.

    - #### setConfigurationGroups

          void setConfigurationGroups(ConfigurationGroup[] aGroups)

      Sets the configuration parameter groups for this Resource.
      Parameters:
        `aGroups` - an array containing `ConfigurationGroup` objects, each of which describes a configuration parameter group for this Resource.
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### addConfigurationGroup

          void addConfigurationGroup(ConfigurationGroup aConfigurationGroup)

      Adds a Configuration Group.
      Parameters:
        `aConfigurationGroup` - the Configuration Group to add
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### removeConfigurationGroup

          void removeConfigurationGroup(ConfigurationGroup aConfigurationGroup)

      Removes an Configuration Group
      Parameters:
        `aConfigurationGroup` - the Configuration Group to remove (must be == with an ConfigurationGroup defined on this resource, or this method will do nothing).
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getCommonParameters

          ConfigurationParameter[] getCommonParameters()

      Gets the configuration parameters that are common to all groups. This property is only meaningful if at least one group is defined.
      Returns:
        an array containing `ConfigurationParameter` objects, each of which describes a parameter common to all groups.

    - #### setCommonParameters

          void setCommonParameters(ConfigurationParameter[] aParams)

      Sets the configuration parameters that are common to all groups. This property is only meaningful if at least one group is defined.
      Parameters:
        `aParams` - an array containing `ConfigurationParameter` objects, each of which describes a parameter common to all groups.

    - #### addCommonParameter

          void addCommonParameter(ConfigurationParameter aConfigurationParameter)

      Adds a Configuration Parameter that is common to all groups.
      Parameters:
        `aConfigurationParameter` - the Configuration Parameter to add
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### removeCommonParameter

          void removeCommonParameter(ConfigurationParameter aConfigurationParameter)

      Removes an Configuration Parameter that is common to all groups.
      Parameters:
        `aConfigurationParameter` - the Configuration Parameter to remove (must be == with an ConfigurationParameter in this collection, or this method will do nothing).
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getDefaultGroupName

          String getDefaultGroupName()

      Gets the name of the default configuration group. This must refer to the names of the `configuration groups`.
      Returns:
        the name of the default configuration group

    - #### setDefaultGroupName

          void setDefaultGroupName(String aGroupName)

      Sets the name of the default configuration group. This must refer to the names of the `configuration groups`.
      Parameters:
        `aGroupName` - the name of the default configuration group

    - #### getSearchStrategy

          String getSearchStrategy()

      Gets the configuration parameter search strategy. Valid values for this property are defined by constants on this interface.
      Returns:
        the configuration parameter search strategy

    - #### setSearchStrategy

          void setSearchStrategy(String aStrategy)

      Sets the configuration parameter search strategy. Valid values for this property are defined by constants on this interface.
      Parameters:
        `aStrategy` - the configuration parameter search strategy

    - #### getConfigurationParameter

          ConfigurationParameter getConfigurationParameter(String aGroupName,
                                                           String aParamName)

      Gets a configuration parameter.
      Parameters:
        `aGroupName` - the name of a group, or `null` for no group
        `aParamName` - the name of the parameter
      Returns:
        the specified parameter, `null` if it does not exist

    - #### getConfigurationGroupDeclarations

          ConfigurationGroup[] getConfigurationGroupDeclarations(String aGroupName)

      Gets the declarations of a named configuration group. There may be more than one declaration for a single group name; in this case, all parameters contained in each of these declarations are considered part of the named group.
      Parameters:
        `aGroupName` - the name of a group
      Returns:
        an array of ConfigurationGroup declarations having the name `aGroupName`. If there are no such groups, an empty array is returned.

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