Interface ResourceMetaData
- All Superinterfaces:
Cloneable
,MetaDataObject
,Serializable
,XMLizable
- All Known Subinterfaces:
AnalysisEngineMetaData
,ProcessingResourceMetaData
- All Known Implementing Classes:
AnalysisEngineMetaData_impl
,ProcessingResourceMetaData_impl
,ResourceMetaData_impl
Encapsulates all metadata for a
Resource
.
As with all MetaDataObject
s, a ResourceMetaData
may or may not be
modifiable. An application can find out by calling the MetaDataObject.isModifiable()
method.-
Method Summary
Modifier and TypeMethodDescriptionGets the configuration parameter declarations for this Resource.Gets the configuration parameter settings for this Resource.Gets the copyright notice for this Resource.Gets the description of this Resource.getName()
Gets the name of this Resource.getUUID()
Gets the UUID (Universally Unique Identifier) for this Resource.Gets the vendor of this Resource.Gets the version number of this Resource.void
Resolves any import declarations throughout this metadata.void
resolveImports
(ResourceManager aResourceManager) Resolves any import declarations throughout this metadata.void
Gets the configuration parameter declarations for this Resource.void
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
Sets the name of this Resource.void
Sets the UUID (Universally Unique Identifier) for this Resource.void
Sets the vendor of this Resource.void
setVersion
(String aVersion) Sets the version number of this Resource.void
Validates configuration parameter settings within this Resource MetaData, and throws an exception if they are not valid.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, buildFromXMLElement, toXML, toXML, toXML, toXML
-
Method Details
-
getUUID
String getUUID()Gets the UUID (Universally Unique Identifier) for this Resource.- Returns:
- the UUID for this Resource
-
setUUID
Sets the UUID (Universally Unique Identifier) for this Resource.- Parameters:
aUUID
- the UUID for this Resource- Throws:
UIMA_UnsupportedOperationException
- if this object is not modifiable
-
getName
String getName()Gets the name of this Resource.- Returns:
- the name of this Resource
-
setName
Sets the name of this Resource.- Parameters:
aName
- the name of this Resource- Throws:
UIMA_UnsupportedOperationException
- if this object is not modifiable
-
getVersion
String getVersion()Gets the version number of this Resource.- Returns:
- the version number of this Resource, as a String
-
setVersion
Sets the version number of this Resource.- Parameters:
aVersion
- the version number of this Resource, as a String- Throws:
UIMA_UnsupportedOperationException
- if this object is not modifiable
-
getDescription
String getDescription()Gets the description of this Resource.- Returns:
- the description of this Resource
-
setDescription
Sets the description of this Resource.- Parameters:
aDescription
- the description of this Resource- Throws:
UIMA_UnsupportedOperationException
- if this object is not modifiable
-
getVendor
String getVendor()Gets the vendor of this Resource.- Returns:
- the vendor of this Resource, as a String
-
setVendor
Sets the vendor of this Resource.- Parameters:
aVendor
- the vendor of this Resource, as a String- Throws:
UIMA_UnsupportedOperationException
- if this object is not modifiable
-
getCopyright
String getCopyright()Gets the copyright notice for this Resource.- Returns:
- the copyright notice for this Resource
-
setCopyright
Sets the copyright notice for this Resource.- Parameters:
aCopyright
- the copyright notice for this Resource- Throws:
UIMA_UnsupportedOperationException
- if this object is not modifiable
-
getConfigurationParameterDeclarations
ConfigurationParameterDeclarations getConfigurationParameterDeclarations()Gets the configuration parameter declarations for this Resource.- Returns:
- an object containing the configuration parameter declarations
-
setConfigurationParameterDeclarations
Gets the configuration parameter declarations for this Resource.- Parameters:
aDeclarations
- an object containing the configuration parameter declarations
-
getConfigurationParameterSettings
ConfigurationParameterSettings getConfigurationParameterSettings()Gets the configuration parameter settings for this Resource.- Returns:
- an object containing the settings for this Resource's configuration parameters.
-
setConfigurationParameterSettings
Sets the configuration parameter settings for this Resource.- Parameters:
aSettings
- an object containing the settings for this Resource's configuration parameters.- Throws:
UIMA_UnsupportedOperationException
- if this object is not modifiable
-
validateConfigurationParameterSettings
Validates configuration parameter settings within this Resource MetaData, and throws an exception if they are not valid.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.
- Throws:
ResourceConfigurationException
- if the configuration parameter settings are invalid
-
resolveImports
Resolves any import declarations throughout this metadata. This base interface cannot contain any interfaces, but subinterfaces may introduce new properties that can have imports that need to be resolved.- Throws:
InvalidXMLException
- if either the import target does not exist or is invalid
-
resolveImports
Resolves any import declarations throughout this metadata. This base interface cannot contain any interfaces, but subinterfaces may introduce new properties that can have imports that need to be resolved.- Parameters:
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 theResourceManager.setDataPath(String)
method.- Throws:
InvalidXMLException
- if either the import target does not exist or is invalid
-