Class ConfigurationParameterSettings_impl
java.lang.Object
org.apache.uima.resource.metadata.impl.MetaDataObject_impl
org.apache.uima.resource.metadata.impl.ConfigurationParameterSettings_impl
- All Implemented Interfaces:
Serializable
,Cloneable
,ConfigurationParameterSettings
,MetaDataObject
,XMLizable
public class ConfigurationParameterSettings_impl
extends MetaDataObject_impl
implements ConfigurationParameterSettings
Reference implementation of
ConfigurationParameterSettings
.- 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildFromXMLElement
(Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) Overridden becuase of settingsForGroups property, which is a Map and isn't handled by default XMLization routines.Override this method to include additional attributesGets the settings for configuration parameters that are not in any group.getParameterValue
(String aParamName) Looks up the value of a parameter.getParameterValue
(String aGroupName, String aParamName) Looks up the value of a parameter in a group.Gets the settings for configuration parameters that are defined within groups.protected XmlizationInfo
To be implemented by subclasses to return information describing how to represent this object in XML.Deprecated.- use getAdditionalAttributes insteadvoid
setParameterSettings
(NameValuePair[] aSettings) Sets the settings for configuration parameters that are not in any group.void
setParameterValue
(String aParamName, Object aValue) Sets the value of a parameter.void
setParameterValue
(String aGroupName, String aParamName, Object aValue) Sets the value of a parameter in a group.protected void
writePropertyAsElement
(PropertyXmlInfo aPropInfo, String aNamespace) Overridden to write the settingsForGroups property, whose value is a Map, which is not supported by the default XMLization routines.Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, clone, equals, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml
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, setAttributeValue, setSourceUrl
-
Constructor Details
-
ConfigurationParameterSettings_impl
public ConfigurationParameterSettings_impl()
-
-
Method Details
-
getParameterSettings
Description copied from interface:ConfigurationParameterSettings
Gets the settings for configuration parameters that are not in any group.- Specified by:
getParameterSettings
in interfaceConfigurationParameterSettings
- Returns:
- an array of
NameValuePair
objects, each of which contains a parameter name and the value of that parameter - See Also:
-
setParameterSettings
Description copied from interface:ConfigurationParameterSettings
Sets the settings for configuration parameters that are not in any group.- Specified by:
setParameterSettings
in interfaceConfigurationParameterSettings
- Parameters:
aSettings
- an array ofNameValuePair
objects, each of which contains a parameter name and the value of that parameter- See Also:
-
getSettingsForGroups
Description copied from interface:ConfigurationParameterSettings
Gets the settings for configuration parameters that are defined within groups.- Specified by:
getSettingsForGroups
in interfaceConfigurationParameterSettings
- Returns:
- a Map with
String
keys (the group names) andNameValuePair
[] values (the settings for parameters in that group. - See Also:
-
getParameterValue
Description copied from interface:ConfigurationParameterSettings
Looks up the value of a parameter. This is a "dumb" getter and does not follow any fallback strategies. It will only return the value of a parameter that is not defined in any group.- Specified by:
getParameterValue
in interfaceConfigurationParameterSettings
- Parameters:
aParamName
- the name of a parameter that is not in any group- Returns:
- the value of the parameter with name
aParamName
- See Also:
-
getParameterValue
Description copied from interface:ConfigurationParameterSettings
Looks up the value of a parameter in a group. This is a "dumb" getter and does not follow any fallback strategies.- Specified by:
getParameterValue
in interfaceConfigurationParameterSettings
- Parameters:
aGroupName
- the name of a configuration group. If this parameter isnull
, this method will return the same value asConfigurationParameterSettings.getParameterValue(String)
.aParamName
- the name of a parameter in the group- Returns:
- the value of the parameter in group
aGroupName
with nameaParamName
- See Also:
-
setParameterValue
Description copied from interface:ConfigurationParameterSettings
Sets the value of a parameter. This only works for a parameter that is not defined in any group.- Specified by:
setParameterValue
in interfaceConfigurationParameterSettings
- Parameters:
aParamName
- the name of a parameter that is not in any groupaValue
- the value to assign to the parameter- See Also:
-
setParameterValue
Description copied from interface:ConfigurationParameterSettings
Sets the value of a parameter in a group.- Specified by:
setParameterValue
in interfaceConfigurationParameterSettings
- Parameters:
aGroupName
- the name of a configuration groupaParamName
- the name of a parameter in the groupaValue
- the value to assign to the parameter- See Also:
-
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
- See Also:
-
getAdditionalAttributes
Description copied from class:MetaDataObject_impl
Override this method to include additional attributes- Overrides:
getAdditionalAttributes
in classMetaDataObject_impl
- Returns:
- additional attributes
-
listAttributes
Deprecated.- use getAdditionalAttributes insteadOverridden to add the settingsForGroups property to the result list. Default introspection implementation won't return it because it has no set method. We've also overridden the XML import/export methods, though, so that set methods are not required.- Specified by:
listAttributes
in interfaceMetaDataObject
- Overrides:
listAttributes
in classMetaDataObject_impl
- Returns:
- a List containing
NameClassPair
objects, each of which contains the name of a parameter and the Class of its value. For primitive types, the wrapper classes will be returned (e.g.java.lang.Integer
instead of int). - See Also:
-
buildFromXMLElement
public void buildFromXMLElement(Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Overridden becuase of settingsForGroups property, which is a Map and isn't handled by default XMLization routines.- Specified by:
buildFromXMLElement
in interfaceXMLizable
- Overrides:
buildFromXMLElement
in classMetaDataObject_impl
- Parameters:
aElement
- the XML element that represents this object.aParser
- a reference to the UIMAXMLParser
. TheXMLParser.buildObject(Element)
method can be used to construct sub-objects.aOptions
- option settings- Throws:
InvalidXMLException
- if the input XML element does not specify a valid object- See Also:
-
writePropertyAsElement
protected void writePropertyAsElement(PropertyXmlInfo aPropInfo, String aNamespace) throws SAXException Overridden to write the settingsForGroups property, whose value is a Map, which is not supported by the default XMLization routines.- Overrides:
writePropertyAsElement
in classMetaDataObject_impl
- Parameters:
aPropInfo
- information on how to represent the property in XMLaNamespace
- XML namespace URI for this object representation- Throws:
SAXException
- -- See Also:
-