Interface ConfigurationParameter

  • All Superinterfaces:
    java.lang.Cloneable, MetaDataObject, java.io.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, 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 MetaDataObjects, a ConfigurationParameter may or may not be modifiable. An application can find out by calling the MetaDataObject.isModifiable() method.

    • Field Detail

      • TYPE_STRING

        static final java.lang.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 java.lang.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 java.lang.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 java.lang.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

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

        void setName​(java.lang.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

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

        void setExternalOverrideName​(java.lang.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

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

        void setDescription​(java.lang.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

        java.lang.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​(java.lang.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

        java.lang.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​(java.lang.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
      • removeOverride

        void removeOverride​(java.lang.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[])