|
||||||||||
| 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.ResourceMetaData_impl
public class ResourceMetaData_impl
Reference implementation of org.apache.uima.resource.ResourceMetaData.
| Constructor Summary | |
|---|---|
ResourceMetaData_impl()
Creates a new ResourceMetaData_impl. |
|
| Method Summary | |
|---|---|
void |
buildFromXMLElement(org.w3c.dom.Element aElement,
XMLParser aParser,
XMLParser.ParsingOptions aOptions)
Overridden to validate configuration parameter data types immediately after parsing is complete. |
protected java.lang.Class |
getClassForParameterType(java.lang.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. |
java.lang.String |
getCopyright()
Gets the copyright notice for this Resource. |
java.lang.String |
getDescription()
Gets the description of this Resource. |
java.lang.String |
getName()
Gets the name of this Resource. |
java.lang.String |
getUUID()
Gets the UUID (Universally Unique Identifier) for this Resource. |
java.lang.String |
getVendor()
Gets the vendor of this Resource. |
java.lang.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(java.lang.String aCopyright)
Sets the copyright notice for this Resource. |
void |
setDescription(java.lang.String aDescription)
Sets the description of this Resource. |
void |
setName(java.lang.String aName)
Sets the name of this Resource. |
void |
setUUID(java.lang.String aUUID)
Sets the UUID (Universally Unique Identifier) for this Resource. |
void |
setVendor(java.lang.String aVendor)
Sets the vendor of this Resource. |
void |
setVersion(java.lang.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,
java.lang.String aGroupName,
ConfigurationParameterDeclarations aParamDecls)
Validates configuration parameter settings within a group. |
| 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, listAttributes, setAttributeValue, setSourceUrl |
| Methods inherited from interface org.apache.uima.util.XMLizable |
|---|
buildFromXMLElement, toXML, toXML, toXML, toXML |
| Constructor Detail |
|---|
public ResourceMetaData_impl()
ResourceMetaData_impl.
| Method Detail |
|---|
public void resolveImports()
throws InvalidXMLException
ResourceMetaData
resolveImports in interface ResourceMetaDataInvalidXMLException - if either the import target does not exist or is invalid
public void resolveImports(ResourceManager aResourceManager)
throws InvalidXMLException
ResourceMetaData
resolveImports 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 invalidpublic java.lang.String getUUID()
ResourceMetaData
getUUID in interface ResourceMetaDataorg.apache.uima.resource.ResourceMetaData#getUUID()public void setUUID(java.lang.String aUUID)
ResourceMetaData
setUUID in interface ResourceMetaDataaUUID - the UUID for this Resourceorg.apache.uima.resource.ResourceMetaData#setUUID(String)public java.lang.String getName()
ResourceMetaData
getName in interface ResourceMetaDataorg.apache.uima.resource.ResourceMetaData#getName()public void setName(java.lang.String aName)
ResourceMetaData
setName in interface ResourceMetaDataaName - the name of this Resourceorg.apache.uima.resource.ResourceMetaData#setName(String)public java.lang.String getVersion()
ResourceMetaData
getVersion in interface ResourceMetaDataorg.apache.uima.resource.ResourceMetaData#getVersion()public void setVersion(java.lang.String aVersion)
ResourceMetaData
setVersion in interface ResourceMetaDataaVersion - the version number of this Resource, as a Stringorg.apache.uima.resource.ResourceMetaData#setVersion(String)public java.lang.String getDescription()
ResourceMetaData
getDescription in interface ResourceMetaDataorg.apache.uima.resource.ResourceMetaData#getDescription()public void setDescription(java.lang.String aDescription)
ResourceMetaData
setDescription in interface ResourceMetaDataaDescription - the description of this Resourceorg.apache.uima.resource.ResourceMetaData#setDescription(String)public java.lang.String getVendor()
ResourceMetaData
getVendor in interface ResourceMetaDataorg.apache.uima.resource.ResourceMetaData#getVendor()public void setVendor(java.lang.String aVendor)
ResourceMetaData
setVendor in interface ResourceMetaDataaVendor - the vendor of this Resource, as a Stringorg.apache.uima.resource.ResourceMetaData#setVendor(String)public java.lang.String getCopyright()
ResourceMetaData
getCopyright in interface ResourceMetaDataorg.apache.uima.resource.ResourceMetaData#getCopyright()public void setCopyright(java.lang.String aCopyright)
ResourceMetaData
setCopyright in interface ResourceMetaDataaCopyright - the copyright notice for this Resourceorg.apache.uima.resource.ResourceMetaData#setCopyright(String)public ConfigurationParameterSettings getConfigurationParameterSettings()
ResourceMetaData
getConfigurationParameterSettings in interface ResourceMetaDataorg.apache.uima.resource.ResourceMetaData#getConfigurationParameterSettings()public void setConfigurationParameterSettings(ConfigurationParameterSettings aSettings)
ResourceMetaData
setConfigurationParameterSettings in interface ResourceMetaDataaSettings - an object containing the settings for this Resource's configuration parameters.org.apache.uima.resource.ResourceMetaData#setConfigurationParameterSettings(org.apache.uima.resource.ConfigurationParameterSettings)public ConfigurationParameterDeclarations getConfigurationParameterDeclarations()
ResourceMetaData
getConfigurationParameterDeclarations in interface ResourceMetaDataorg.apache.uima.resource.ResourceMetaData#getConfigurationParameterDeclarations()public void setConfigurationParameterDeclarations(ConfigurationParameterDeclarations aDeclarations)
ResourceMetaData
setConfigurationParameterDeclarations in interface ResourceMetaDataaDeclarations - an object containig the configuration parameter declarationsorg.apache.uima.resource.ResourceMetaData#setConfigurationParameterDeclarations(org.apache.uima.resource.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,
java.lang.String aGroupName,
ConfigurationParameterDeclarations aParamDecls)
throws ResourceConfigurationException
aNVPs - the parameter settingsaGroupName - the groupaParamDecls - Configuration Parameter Declarations
ResourceConfigurationException - if the configuration parameter settings are invalid
protected 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 value
ResourceConfigurationException - if the data types do not matchprotected java.lang.Class getClassForParameterType(java.lang.String paramType)
paramType - parameter type name from ConfigurationParameterDeclarations
public void buildFromXMLElement(org.w3c.dom.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 settings
InvalidXMLException - 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_implprotected static XmlizationInfo getXmlizationInfoForClass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||