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:
java.io.Serializable,java.lang.Cloneable,ConfigurationParameterSettings,MetaDataObject,XMLizable
public class ConfigurationParameterSettings_impl extends MetaDataObject_impl implements ConfigurationParameterSettings
Reference implementation ofConfigurationParameterSettings.- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description ConfigurationParameterSettings_impl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidbuildFromXMLElement(org.w3c.dom.Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions)Overridden becuase of settingsForGroups property, which is a Map and isn't handled by default XMLization routines.java.util.List<MetaDataObject_impl.MetaDataAttr>getAdditionalAttributes()Override this method to include additional attributesNameValuePair[]getParameterSettings()Gets the settings for configuration parameters that are not in any group.java.lang.ObjectgetParameterValue(java.lang.String aParamName)Looks up the value of a parameter.java.lang.ObjectgetParameterValue(java.lang.String aGroupName, java.lang.String aParamName)Looks up the value of a parameter in a group.java.util.Map<java.lang.String,NameValuePair[]>getSettingsForGroups()Gets the settings for configuration parameters that are defined within groups.protected XmlizationInfogetXmlizationInfo()To be implemented by subclasses to return information describing how to represent this object in XML.java.util.List<NameClassPair>listAttributes()Deprecated.- use getAdditionalAttributes insteadvoidsetParameterSettings(NameValuePair[] aSettings)Sets the settings for configuration parameters that are not in any group.voidsetParameterValue(java.lang.String aParamName, java.lang.Object aValue)Sets the value of a parameter.voidsetParameterValue(java.lang.String aGroupName, java.lang.String aParamName, java.lang.Object aValue)Sets the value of a parameter in a group.protected voidwritePropertyAsElement(PropertyXmlInfo aPropInfo, java.lang.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
-
-
-
-
Method Detail
-
getParameterSettings
public NameValuePair[] getParameterSettings()
Description copied from interface:ConfigurationParameterSettingsGets the settings for configuration parameters that are not in any group.- Specified by:
getParameterSettingsin interfaceConfigurationParameterSettings- Returns:
- an array of
NameValuePairobjects, each of which contains a parameter name and the value of that parameter - See Also:
ConfigurationParameterSettings.getParameterSettings()
-
setParameterSettings
public void setParameterSettings(NameValuePair[] aSettings)
Description copied from interface:ConfigurationParameterSettingsSets the settings for configuration parameters that are not in any group.- Specified by:
setParameterSettingsin interfaceConfigurationParameterSettings- Parameters:
aSettings- an array ofNameValuePairobjects, each of which contains a parameter name and the value of that parameter- See Also:
ConfigurationParameterSettings.setParameterSettings(NameValuePair[])
-
getSettingsForGroups
public java.util.Map<java.lang.String,NameValuePair[]> getSettingsForGroups()
Description copied from interface:ConfigurationParameterSettingsGets the settings for configuration parameters that are defined within groups.- Specified by:
getSettingsForGroupsin interfaceConfigurationParameterSettings- Returns:
- a Map with
Stringkeys (the group names) andNameValuePair[] values (the settings for parameters in that group. - See Also:
ConfigurationParameterSettings.getSettingsForGroups()
-
getParameterValue
public java.lang.Object getParameterValue(java.lang.String aParamName)
Description copied from interface:ConfigurationParameterSettingsLooks 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:
getParameterValuein 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:
ConfigurationParameterSettings.getParameterValue(String)
-
getParameterValue
public java.lang.Object getParameterValue(java.lang.String aGroupName, java.lang.String aParamName)Description copied from interface:ConfigurationParameterSettingsLooks up the value of a parameter in a group. This is a "dumb" getter and does not follow any fallback strategies.- Specified by:
getParameterValuein 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
aGroupNamewith nameaParamName - See Also:
ConfigurationParameterSettings.getParameterValue(java.lang.String, java.lang.String)
-
setParameterValue
public void setParameterValue(java.lang.String aParamName, java.lang.Object aValue)Description copied from interface:ConfigurationParameterSettingsSets the value of a parameter. This only works for a parameter that is not defined in any group.- Specified by:
setParameterValuein interfaceConfigurationParameterSettings- Parameters:
aParamName- the name of a parameter that is not in any groupaValue- the value to assign to the parameter- See Also:
ConfigurationParameterSettings.setParameterValue(java.lang.String, java.lang.Object)
-
setParameterValue
public void setParameterValue(java.lang.String aGroupName, java.lang.String aParamName, java.lang.Object aValue)Description copied from interface:ConfigurationParameterSettingsSets the value of a parameter in a group.- Specified by:
setParameterValuein 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:
ConfigurationParameterSettings.setParameterValue(java.lang.String, java.lang.String, java.lang.Object)
-
getXmlizationInfo
protected XmlizationInfo 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
- See Also:
MetaDataObject_impl.getXmlizationInfo()
-
getAdditionalAttributes
public java.util.List<MetaDataObject_impl.MetaDataAttr> getAdditionalAttributes()
Description copied from class:MetaDataObject_implOverride this method to include additional attributes- Overrides:
getAdditionalAttributesin classMetaDataObject_impl- Returns:
- additional attributes
-
listAttributes
@Deprecated public java.util.List<NameClassPair> 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:
listAttributesin interfaceMetaDataObject- Overrides:
listAttributesin classMetaDataObject_impl- Returns:
- a List containing
NameClassPairobjects, 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.Integerinstead of int). - See Also:
MetaDataObject.listAttributes()
-
buildFromXMLElement
public void buildFromXMLElement(org.w3c.dom.Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLExceptionOverridden becuase of settingsForGroups property, which is a Map and isn't handled by default XMLization routines.- Specified by:
buildFromXMLElementin interfaceXMLizable- Overrides:
buildFromXMLElementin 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:
XMLizable.buildFromXMLElement(org.w3c.dom.Element, org.apache.uima.util.XMLParser)
-
writePropertyAsElement
protected void writePropertyAsElement(PropertyXmlInfo aPropInfo, java.lang.String aNamespace) throws org.xml.sax.SAXException
Overridden to write the settingsForGroups property, whose value is a Map, which is not supported by the default XMLization routines.- Overrides:
writePropertyAsElementin classMetaDataObject_impl- Parameters:
aPropInfo- information on how to represent the property in XMLaNamespace- XML namespace URI for this object representation- Throws:
org.xml.sax.SAXException- -- See Also:
MetaDataObject_impl.writePropertyAsElement(PropertyXmlInfo, String)
-
-