public class ResourceMetaData_impl extends MetaDataObject_impl implements ResourceMetaData
ResourceMetaData.MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.SerializerserialContext| 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, writePropertyAsElementfinalize, getClass, notify, notifyAll, wait, wait, waitclone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrlpublic ResourceMetaData_impl()
ResourceMetaData_impl.public void resolveImports()
throws InvalidXMLException
ResourceMetaDataresolveImports in interface ResourceMetaDataInvalidXMLException - if either the import target does not exist or is invalidResourceMetaData.resolveImports()public void resolveImports(ResourceManager aResourceManager) throws InvalidXMLException
ResourceMetaDataresolveImports in interface ResourceMetaDataaResourceManager - 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()
ResourceMetaDatagetUUID in interface ResourceMetaDataResourceMetaData.getUUID()public void setUUID(String aUUID)
ResourceMetaDatasetUUID in interface ResourceMetaDataaUUID - the UUID for this ResourceResourceMetaData.setUUID(String)public String getName()
ResourceMetaDatagetName in interface ResourceMetaDataResourceMetaData.getName()public void setName(String aName)
ResourceMetaDatasetName in interface ResourceMetaDataaName - the name of this ResourceResourceMetaData.setName(String)public String getVersion()
ResourceMetaDatagetVersion in interface ResourceMetaDataResourceMetaData.getVersion()public void setVersion(String aVersion)
ResourceMetaDatasetVersion in interface ResourceMetaDataaVersion - the version number of this Resource, as a StringResourceMetaData.setVersion(String)public String getDescription()
ResourceMetaDatagetDescription in interface ResourceMetaDataResourceMetaData.getDescription()public void setDescription(String aDescription)
ResourceMetaDatasetDescription in interface ResourceMetaDataaDescription - the description of this ResourceResourceMetaData.setDescription(String)public String getVendor()
ResourceMetaDatagetVendor in interface ResourceMetaDataResourceMetaData.getVendor()public void setVendor(String aVendor)
ResourceMetaDatasetVendor in interface ResourceMetaDataaVendor - the vendor of this Resource, as a StringResourceMetaData.setVendor(String)public String getCopyright()
ResourceMetaDatagetCopyright in interface ResourceMetaDataResourceMetaData.getCopyright()public void setCopyright(String aCopyright)
ResourceMetaDatasetCopyright in interface ResourceMetaDataaCopyright - the copyright notice for this ResourceResourceMetaData.setCopyright(String)public ConfigurationParameterSettings getConfigurationParameterSettings()
ResourceMetaDatagetConfigurationParameterSettings in interface ResourceMetaDataResourceMetaData.getConfigurationParameterSettings()public void setConfigurationParameterSettings(ConfigurationParameterSettings aSettings)
ResourceMetaDatasetConfigurationParameterSettings in interface ResourceMetaDataaSettings - an object containing the settings for this Resource's configuration parameters.ResourceMetaData.setConfigurationParameterSettings(ConfigurationParameterSettings)public ConfigurationParameterDeclarations getConfigurationParameterDeclarations()
ResourceMetaDatagetConfigurationParameterDeclarations in interface ResourceMetaDataResourceMetaData.getConfigurationParameterDeclarations()public void setConfigurationParameterDeclarations(ConfigurationParameterDeclarations aDeclarations)
ResourceMetaDatasetConfigurationParameterDeclarations in interface ResourceMetaDataaDeclarations - 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 ResourceMetaDataResourceConfigurationException - 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 XMLizablebuildFromXMLElement in class MetaDataObject_implaElement - 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_implgetXmlizationInfo in class MetaDataObject_implprotected static XmlizationInfo getXmlizationInfoForClass()
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.