|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.resource.metadata.impl.MetaDataObject_impl
org.apache.uima.resource.metadata.impl.ConfigurationParameterSettings_impl
public class ConfigurationParameterSettings_impl
Reference implementation of ConfigurationParameterSettings
.
Constructor Summary | |
---|---|
ConfigurationParameterSettings_impl()
|
Method Summary | |
---|---|
void |
buildFromXMLElement(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. |
NameValuePair[] |
getParameterSettings()
Gets the settings for configuration parameters that are not in any group. |
java.lang.Object |
getParameterValue(java.lang.String aParamName)
Looks up the value of a parameter. |
java.lang.Object |
getParameterValue(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 XmlizationInfo |
getXmlizationInfo()
To be implemented by subclasses to return information describing how to represent this object in XML. |
java.util.List<NameClassPair> |
listAttributes()
Overridden to add the settingsForGroups property to the result list. |
void |
setParameterSettings(NameValuePair[] aSettings)
Sets the settings for configuration parameters that are not in any group. |
void |
setParameterValue(java.lang.String aParamName,
java.lang.Object aValue)
Sets the value of a parameter. |
void |
setParameterValue(java.lang.String aGroupName,
java.lang.String aParamName,
java.lang.Object aValue)
Sets the value of a parameter in a group. |
protected void |
writePropertyAsElement(PropertyXmlInfo aPropInfo,
java.lang.String aNamespace,
org.xml.sax.ContentHandler aContentHandler)
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, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, setAttributeValue, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, 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 |
Methods inherited from interface org.apache.uima.util.XMLizable |
---|
buildFromXMLElement, toXML, toXML, toXML, toXML |
Constructor Detail |
---|
public ConfigurationParameterSettings_impl()
Method Detail |
---|
public NameValuePair[] getParameterSettings()
ConfigurationParameterSettings
getParameterSettings
in interface ConfigurationParameterSettings
NameValuePair
objects, each of which contains a parameter
name and the value of that parameterorg.apache.uima.resource.ConfigurationParameterSettings#getParameterSettings()
public void setParameterSettings(NameValuePair[] aSettings)
ConfigurationParameterSettings
setParameterSettings
in interface ConfigurationParameterSettings
aSettings
- an array of NameValuePair
objects, each of which contains a parameter
name and the value of that parameterorg.apache.uima.resource.ConfigurationParameterSettings#setParameterSettings(org.apache.uima.resource.NameValuePair[])
public java.util.Map<java.lang.String,NameValuePair[]> getSettingsForGroups()
ConfigurationParameterSettings
getSettingsForGroups
in interface ConfigurationParameterSettings
String
keys (the group names) and NameValuePair
[]
values (the settings for parameters in that group.org.apache.uima.resource.ConfigurationParameterSettings#getSettingsForGroups()
public java.lang.Object getParameterValue(java.lang.String aParamName)
ConfigurationParameterSettings
getParameterValue
in interface ConfigurationParameterSettings
aParamName
- the name of a parameter that is not in any group
aParamName
org.apache.uima.resource.ConfigurationParameterSettings#getParameterValue(java.lang.String)
public java.lang.Object getParameterValue(java.lang.String aGroupName, java.lang.String aParamName)
ConfigurationParameterSettings
getParameterValue
in interface ConfigurationParameterSettings
aGroupName
- the name of a configuration group. If this parameter is
null, this method will return the same value as
ConfigurationParameterSettings.getParameterValue(String)
.aParamName
- the name of a parameter in the group
- Returns:
- the value of the parameter in group
aGroupName
with
name aParamName
- See Also:
org.apache.uima.resource.ConfigurationParameterSettings#getParameterValue(java.lang.String,
java.lang.String)
public void setParameterValue(java.lang.String aParamName, java.lang.Object aValue)
ConfigurationParameterSettings
setParameterValue
in interface ConfigurationParameterSettings
aParamName
- the name of a parameter that is not in any groupaValue
- the value to assign to the parameterorg.apache.uima.resource.ConfigurationParameterSettings#setParameterValue(java.lang.String,
java.lang.Object)
public void setParameterValue(java.lang.String aGroupName, java.lang.String aParamName, java.lang.Object aValue)
ConfigurationParameterSettings
setParameterValue
in interface ConfigurationParameterSettings
aGroupName
- the name of a configuration groupaParamName
- the name of a parameter in the groupaValue
- the value to assign to the parameterorg.apache.uima.resource.ConfigurationParameterSettings#setParameterValue(java.lang.String,
java.lang.String, java.lang.Object)
protected XmlizationInfo getXmlizationInfo()
MetaDataObject_impl
getXmlizationInfo
in class MetaDataObject_impl
org.apache.uima.resource.impl.MetaDataObject_impl#getXmlizationInfo()
public java.util.List<NameClassPair> listAttributes()
listAttributes
in interface MetaDataObject
listAttributes
in class MetaDataObject_impl
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).org.apache.uima.resource.MetaDataObject#listAttributes()
public void buildFromXMLElement(org.w3c.dom.Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
buildFromXMLElement
in interface XMLizable
buildFromXMLElement
in class MetaDataObject_impl
aElement
- the XML element that represents this object.aParser
- a reference to the UIMA XMLParser
. The
XMLParser.buildObject(Element)
method can be used to construct sub-objects.aOptions
- option settings
InvalidXMLException
- if the input XML element does not specify a valid objectXMLizable.buildFromXMLElement(org.w3c.dom.Element,
org.apache.uima.util.XMLParser)
protected void writePropertyAsElement(PropertyXmlInfo aPropInfo, java.lang.String aNamespace, org.xml.sax.ContentHandler aContentHandler) throws org.xml.sax.SAXException
writePropertyAsElement
in class MetaDataObject_impl
aPropInfo
- information on how to represent the property in XMLaNamespace
- XML namespace URI for this objectaContentHandler
- content handler to which this object will send events that describe its XML
representation
org.xml.sax.SAXException
org.apache.uima.resource.impl.MetaDataObject_impl#writePropertyAsElement(org.apache.uima.resource.impl.PropertyXmlInfo,
java.lang.String, ContentHandler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |