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:
-
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_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LONG, TYPE_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOverride
(String aOverride) Adds an override to this configuration parameter.Retrieves the description of this configuration parameter.Retrieves the external name of this configuration parameter.getName()
Retrieves the name of this configuration parameter.String[]
Gets the parameters that are this parameter overrides.getType()
Retrieves the data type of this configuration parameter.protected XmlizationInfo
To be implemented by subclasses to return information describing how to represent this object in XML.boolean
Retrieves whether this parameter is mandatory.boolean
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
Sets the name of this configuration parameter.void
setOverrides
(String... aOverrides) Sets the parameters that are this parameter overrides.void
Sets the data type of this configuration parameter.static boolean
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 Details
-
ConfigurationParameter_impl
public ConfigurationParameter_impl()
-
-
Method Details
-
getName
Description copied from interface:ConfigurationParameter
Retrieves the name of this configuration parameter.- Specified by:
getName
in interfaceConfigurationParameter
- Returns:
- the name of this configuration parameter.
-
setName
Description copied from interface:ConfigurationParameter
Sets the name of this configuration parameter.- Specified by:
setName
in interfaceConfigurationParameter
- Parameters:
aName
- the name of this configuration parameter.
-
getExternalOverrideName
Description copied from interface:ConfigurationParameter
Retrieves the external name of this configuration parameter.- Specified by:
getExternalOverrideName
in interfaceConfigurationParameter
- Returns:
- the external name of this configuration parameter.
-
setExternalOverrideName
Description copied from interface:ConfigurationParameter
Sets the external name of this configuration parameter.- Specified by:
setExternalOverrideName
in interfaceConfigurationParameter
- Parameters:
aExternalOverrideName
- the external name of this configuration parameter.
-
getDescription
Description copied from interface:ConfigurationParameter
Retrieves the description of this configuration parameter.- Specified by:
getDescription
in interfaceConfigurationParameter
- Returns:
- the description of this configuration parameter.
-
setDescription
Description copied from interface:ConfigurationParameter
Sets the description of this configuration parameter.- Specified by:
setDescription
in interfaceConfigurationParameter
- Parameters:
aDescription
- the description of this configuration parameter.
-
getType
Description copied from interface:ConfigurationParameter
Retrieves the data type of this configuration parameter.- Specified by:
getType
in interfaceConfigurationParameter
- Returns:
- the data type of this configuration parameter. This will be one of the TYPE constants defined on this interface.
-
setType
Description copied from interface:ConfigurationParameter
Sets the data type of this configuration parameter.- Specified by:
setType
in interfaceConfigurationParameter
- Parameters:
aType
- the data type of this configuration parameter. This must be one of the TYPE constants defined on this interface.- Throws:
UIMA_IllegalArgumentException
- ifaType
is not a valid data type defined by a TYPE constant on this interface.
-
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 interfaceConfigurationParameter
- Returns:
- true if and only if this parameter is multi-valued.
-
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 interfaceConfigurationParameter
- Parameters:
aMultiValued
- true if and only if this parameter is multi-valued.
-
isMandatory
public boolean isMandatory()Description copied from interface:ConfigurationParameter
Retrieves whether this parameter is mandatory.- Specified by:
isMandatory
in interfaceConfigurationParameter
- Returns:
- true if and only if this parameter is mandatory.
-
setMandatory
public void setMandatory(boolean aMandatory) Description copied from interface:ConfigurationParameter
Sets whether this parameter is mandatory.- Specified by:
setMandatory
in interfaceConfigurationParameter
- Parameters:
aMandatory
- true if and only if this parameter is mandatory.
-
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 overridesannotator1/parameter1
would override the parameter namedparameter1
within the component namedannotator1
.- Specified by:
getOverrides
in interfaceConfigurationParameter
- Returns:
- the parameters this this parameter overrides
-
setOverrides
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 overridesannotator1/parameter1
would override the parameter namedparameter1
within the component namedannotator1
.- Specified by:
setOverrides
in interfaceConfigurationParameter
- Parameters:
aOverrides
- the parameters this this parameter overrides
-
addOverride
Description copied from interface:ConfigurationParameter
Adds an override to this configuration parameter.- Specified by:
addOverride
in interfaceConfigurationParameter
- Parameters:
aOverride
- the override to add- See Also:
-
removeOverride
Description copied from interface:ConfigurationParameter
Removes an override from this configuration parameter.- Specified by:
removeOverride
in interfaceConfigurationParameter
- 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:
-
typeMatch
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 checkaTypeName
- configuration parameter type, as defined by one of the TYPE constants on theConfigurationParameter
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 byaTypeName
andaMultiValued
.
-
isValidDataTypeName
Determines whether the given String is a valid name for a data type. Valid data type names are legal arguments to thesetType(String)
method, and are defined by the TYPE constants on theConfigurationParameter
interface.- Parameters:
aTypeName
- an Object to test- Returns:
- true if and only if
aTypeName
is aString
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 classMetaDataObject_impl
- Parameters:
aPropXmlInfo
- information about the property to readaPropClass
- class of the property's valueaElement
- DOM element representing the entire arrayaParser
- parser to use to construct complex valuesaOptions
- option settings- Throws:
InvalidXMLException
- -
-
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 classMetaDataObject_impl
- Returns:
- information defining this object's XML representation
-