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
serialContextFields inherited from interface org.apache.uima.resource.metadata.ConfigurationParameter
TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LONG, TYPE_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOverride(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 XmlizationInfoTo be implemented by subclasses to return information describing how to represent this object in XML.booleanRetrieves whether this parameter is mandatory.booleanRetrieves whether this parameter is multi-valued.protected static booleanisValidDataTypeName(Object aTypeName) Determines whether the given String is a valid name for a data type.protected voidreadArrayPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo, Class aPropClass, Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) Overriden to allow both "param" and "parameter" as the array element tags.voidremoveOverride(String aOverride) Removes an override from this configuration parameter.voidsetDescription(String aDescription) Sets the description of this configuration parameter.voidsetExternalOverrideName(String aExternalOverrideName) Sets the external name of this configuration parameter.voidsetMandatory(boolean aMandatory) Sets whether this parameter is mandatory.voidsetMultiValued(boolean aMultiValued) Sets whether this parameter is multi-valued.voidSets the name of this configuration parameter.voidsetOverrides(String[] aOverrides) Sets the parameters that are this parameter overrides.voidSets the data type of this configuration parameter.static booleanDetermines 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, writePropertyAsElementMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrlMethods 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:ConfigurationParameterRetrieves the name of this configuration parameter.- Specified by:
getNamein interfaceConfigurationParameter- Returns:
- the name of this configuration parameter.
- See Also:
-
setName
Description copied from interface:ConfigurationParameterSets the name of this configuration parameter.- Specified by:
setNamein interfaceConfigurationParameter- Parameters:
aName- the name of this configuration parameter.- See Also:
-
getExternalOverrideName
Description copied from interface:ConfigurationParameterRetrieves the external name of this configuration parameter.- Specified by:
getExternalOverrideNamein interfaceConfigurationParameter- Returns:
- the external name of this configuration parameter.
- See Also:
-
setExternalOverrideName
Description copied from interface:ConfigurationParameterSets the external name of this configuration parameter.- Specified by:
setExternalOverrideNamein interfaceConfigurationParameter- Parameters:
aExternalOverrideName- the external name of this configuration parameter.- See Also:
-
getDescription
Description copied from interface:ConfigurationParameterRetrieves the description of this configuration parameter.- Specified by:
getDescriptionin interfaceConfigurationParameter- Returns:
- the description of this configuration parameter.
- See Also:
-
setDescription
Description copied from interface:ConfigurationParameterSets the description of this configuration parameter.- Specified by:
setDescriptionin interfaceConfigurationParameter- Parameters:
aDescription- the description of this configuration parameter.- See Also:
-
getType
Description copied from interface:ConfigurationParameterRetrieves the data type of this configuration parameter.- Specified by:
getTypein interfaceConfigurationParameter- Returns:
- the data type of this configuration parameter. This will be one of the TYPE constants defined on this interface.
- See Also:
-
setType
Description copied from interface:ConfigurationParameterSets the data type of this configuration parameter.- Specified by:
setTypein 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- ifaTypeis not a valid data type defined by a TYPE constant on this interface.- See Also:
-
isMultiValued
public boolean isMultiValued()Description copied from interface:ConfigurationParameterRetrieves 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:
isMultiValuedin interfaceConfigurationParameter- Returns:
- true if and only if this parameter is multi-valued.
- See Also:
-
setMultiValued
public void setMultiValued(boolean aMultiValued) Description copied from interface:ConfigurationParameterSets 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:
setMultiValuedin interfaceConfigurationParameter- Parameters:
aMultiValued- true if and only if this parameter is multi-valued.- See Also:
-
isMandatory
public boolean isMandatory()Description copied from interface:ConfigurationParameterRetrieves whether this parameter is mandatory.- Specified by:
isMandatoryin interfaceConfigurationParameter- Returns:
- true if and only if this parameter is mandatory.
- See Also:
-
setMandatory
public void setMandatory(boolean aMandatory) Description copied from interface:ConfigurationParameterSets whether this parameter is mandatory.- Specified by:
setMandatoryin interfaceConfigurationParameter- Parameters:
aMandatory- true if and only if this parameter is mandatory.- See Also:
-
getOverrides
Description copied from interface:ConfigurationParameterGets 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/parameter1would override the parameter namedparameter1within the component namedannotator1.- Specified by:
getOverridesin interfaceConfigurationParameter- Returns:
- the parameters this this parameter overrides
-
setOverrides
Description copied from interface:ConfigurationParameterSets 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/parameter1would override the parameter namedparameter1within the component namedannotator1.- Specified by:
setOverridesin interfaceConfigurationParameter- Parameters:
aOverrides- the parameters this this parameter overrides
-
addOverride
Description copied from interface:ConfigurationParameterAdds an override to this configuration parameter.- Specified by:
addOverridein interfaceConfigurationParameter- Parameters:
aOverride- the override to add- See Also:
-
removeOverride
Description copied from interface:ConfigurationParameterRemoves an override from this configuration parameter.- Specified by:
removeOverridein 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 theConfigurationParameterinterface.aMultiValued- true if and only if the configuration parameter is multi-valued. If true,aClassis expected to be an array.- Returns:
- true if and only if an object of class
aClasscan be legally assigned to a parameter described byaTypeNameandaMultiValued.
-
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 theConfigurationParameterinterface.- Parameters:
aTypeName- an Object to test- Returns:
- true if and only if
aTypeNameis aStringthat 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:
readArrayPropertyValueFromXMLElementin 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_implTo be implemented by subclasses to return information describing how to represent this object in XML.- Specified by:
getXmlizationInfoin classMetaDataObject_impl- Returns:
- information defining this object's XML representation
-