public class ResourceMetaData_impl extends MetaDataObject_impl implements ResourceMetaData
ResourceMetaData
.MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer
serialContext
Constructor and Description |
---|
ResourceMetaData_impl()
Creates a new
ResourceMetaData_impl . |
Modifier and Type | Method and Description |
---|---|
void |
buildFromXMLElement(Element aElement,
XMLParser aParser,
XMLParser.ParsingOptions aOptions)
Overridden to validate configuration parameter data types immediately after parsing is
complete.
|
protected Class<?> |
getClassForParameterType(String paramType)
Gets the expected Java class for the given parameter type name.
|
ConfigurationParameterDeclarations |
getConfigurationParameterDeclarations()
Gets the configuration parameter declarations for this Resource.
|
ConfigurationParameterSettings |
getConfigurationParameterSettings()
Gets the configuration parameter settings for this Resource.
|
String |
getCopyright()
Gets the copyright notice for this Resource.
|
String |
getDescription()
Gets the description of this Resource.
|
String |
getName()
Gets the name of this Resource.
|
String |
getUUID()
Gets the UUID (Universally Unique Identifier) for this Resource.
|
String |
getVendor()
Gets the vendor of this Resource.
|
String |
getVersion()
Gets the version number of this Resource.
|
protected XmlizationInfo |
getXmlizationInfo()
To be implemented by subclasses to return information describing how to represent this object
in XML.
|
protected static XmlizationInfo |
getXmlizationInfoForClass()
Static method to get XmlizationInfo, used by subclasses to set up their own XmlizationInfo.
|
void |
resolveImports()
Resolves any import declarations throughout this metadata.
|
void |
resolveImports(ResourceManager aResourceManager)
Resolves any import declarations throughout this metadata.
|
void |
setConfigurationParameterDeclarations(ConfigurationParameterDeclarations aDeclarations)
Gets the configuration parameter declarations for this Resource.
|
void |
setConfigurationParameterSettings(ConfigurationParameterSettings aSettings)
Sets the configuration parameter settings for this Resource.
|
void |
setCopyright(String aCopyright)
Sets the copyright notice for this Resource.
|
void |
setDescription(String aDescription)
Sets the description of this Resource.
|
void |
setName(String aName)
Sets the name of this Resource.
|
void |
setUUID(String aUUID)
Sets the UUID (Universally Unique Identifier) for this Resource.
|
void |
setVendor(String aVendor)
Sets the vendor of this Resource.
|
void |
setVersion(String aVersion)
Sets the version number of this Resource.
|
protected void |
validateConfigurationParameterDataTypeMatch(ConfigurationParameter aParam,
NameValuePair aNVP)
Validate that a value is of an appropriate data type for assignment to the given parameter.
|
void |
validateConfigurationParameterSettings()
Validates configuration parameter settings within this Resource MetaData, and throws an
exception if they are not valid.
|
protected void |
validateConfigurationParameterSettings(NameValuePair[] aNVPs,
String aGroupName,
ConfigurationParameterDeclarations aParamDecls)
Validates configuration parameter settings within a group.
|
buildFromXMLElement, clone, equals, getAdditionalAttributes, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElement
finalize, getClass, notify, notifyAll, wait, wait, wait
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
public ResourceMetaData_impl()
ResourceMetaData_impl
.public void resolveImports() throws InvalidXMLException
ResourceMetaData
resolveImports
in interface ResourceMetaData
InvalidXMLException
- if either the import target does not exist or is invalidResourceMetaData.resolveImports()
public void resolveImports(ResourceManager aResourceManager) throws InvalidXMLException
ResourceMetaData
resolveImports
in interface ResourceMetaData
aResourceManager
- the Resource Manager used to locate descriptors imported by name. For example, the
path in which to locate these descriptors can be set via the
ResourceManager.setDataPath(String)
method.InvalidXMLException
- if either the import target does not exist or is invalidResourceMetaData.resolveImports(ResourceManager)
public String getUUID()
ResourceMetaData
getUUID
in interface ResourceMetaData
ResourceMetaData.getUUID()
public void setUUID(String aUUID)
ResourceMetaData
setUUID
in interface ResourceMetaData
aUUID
- the UUID for this ResourceResourceMetaData.setUUID(String)
public String getName()
ResourceMetaData
getName
in interface ResourceMetaData
ResourceMetaData.getName()
public void setName(String aName)
ResourceMetaData
setName
in interface ResourceMetaData
aName
- the name of this ResourceResourceMetaData.setName(String)
public String getVersion()
ResourceMetaData
getVersion
in interface ResourceMetaData
ResourceMetaData.getVersion()
public void setVersion(String aVersion)
ResourceMetaData
setVersion
in interface ResourceMetaData
aVersion
- the version number of this Resource, as a StringResourceMetaData.setVersion(String)
public String getDescription()
ResourceMetaData
getDescription
in interface ResourceMetaData
ResourceMetaData.getDescription()
public void setDescription(String aDescription)
ResourceMetaData
setDescription
in interface ResourceMetaData
aDescription
- the description of this ResourceResourceMetaData.setDescription(String)
public String getVendor()
ResourceMetaData
getVendor
in interface ResourceMetaData
ResourceMetaData.getVendor()
public void setVendor(String aVendor)
ResourceMetaData
setVendor
in interface ResourceMetaData
aVendor
- the vendor of this Resource, as a StringResourceMetaData.setVendor(String)
public String getCopyright()
ResourceMetaData
getCopyright
in interface ResourceMetaData
ResourceMetaData.getCopyright()
public void setCopyright(String aCopyright)
ResourceMetaData
setCopyright
in interface ResourceMetaData
aCopyright
- the copyright notice for this ResourceResourceMetaData.setCopyright(String)
public ConfigurationParameterSettings getConfigurationParameterSettings()
ResourceMetaData
getConfigurationParameterSettings
in interface ResourceMetaData
ResourceMetaData.getConfigurationParameterSettings()
public void setConfigurationParameterSettings(ConfigurationParameterSettings aSettings)
ResourceMetaData
setConfigurationParameterSettings
in interface ResourceMetaData
aSettings
- an object containing the settings for this Resource's configuration parameters.ResourceMetaData.setConfigurationParameterSettings(ConfigurationParameterSettings)
public ConfigurationParameterDeclarations getConfigurationParameterDeclarations()
ResourceMetaData
getConfigurationParameterDeclarations
in interface ResourceMetaData
ResourceMetaData.getConfigurationParameterDeclarations()
public void setConfigurationParameterDeclarations(ConfigurationParameterDeclarations aDeclarations)
ResourceMetaData
setConfigurationParameterDeclarations
in interface ResourceMetaData
aDeclarations
- an object containing the configuration parameter declarationsResourceMetaData.setConfigurationParameterDeclarations(ConfigurationParameterDeclarations)
public void validateConfigurationParameterSettings() throws ResourceConfigurationException
This method checks to make sure that each configuration parameter setting corresponds to an declared configuration parameter, and that the data types are compatible. It does NOT check that all mandatory parameters have been assigned values - this should be done at resource initialization time and not before.
NOTE: this method can cause a change to the ConfigurationParameterSettings object in the case where the value of a parameter is an empty Object[] and the parameter type is an array of a different type. In this case the empty object array will be replaced by an empty array of the appropriate type.
validateConfigurationParameterSettings
in interface ResourceMetaData
ResourceConfigurationException
- if the configuration parameter settings are invalidResourceMetaData.validateConfigurationParameterSettings()
protected void validateConfigurationParameterSettings(NameValuePair[] aNVPs, String aGroupName, ConfigurationParameterDeclarations aParamDecls) throws ResourceConfigurationException
aNVPs
- the parameter settingsaGroupName
- the groupaParamDecls
- Configuration Parameter DeclarationsResourceConfigurationException
- if the configuration parameter settings are invalidprotected void validateConfigurationParameterDataTypeMatch(ConfigurationParameter aParam, NameValuePair aNVP) throws ResourceConfigurationException
NOTE: this method can cause a change to the NameValuePair object in the case where the value of a parameter is an empty Object[] and the parameter type is an array of a different type. In this case the empty object array will be replaced by an empty array of the appropriate type.
aParam
- configuration parameteraNVP
- name value pair containing candidate valueResourceConfigurationException
- if the data types do not matchprotected Class<?> getClassForParameterType(String paramType)
paramType
- parameter type name from ConfigurationParameterDeclarationspublic void buildFromXMLElement(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 settingsInvalidXMLException
- if the input XML element does not specify a valid objectXMLizable.buildFromXMLElement(org.w3c.dom.Element,
org.apache.uima.util.XMLParser)
protected XmlizationInfo getXmlizationInfo()
MetaDataObject_impl
getXmlizationInfo
in class MetaDataObject_impl
protected static XmlizationInfo getXmlizationInfoForClass()
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.