public interface ResourceCreationSpecifier extends ResourceSpecifier
ResourceCreationSpecifier
is the supertype of
AnalysisEngineDescription
,
CasConsumerDescription
,
CollectionReaderDescription
, and
CasInitializerDescription
.
All Resource Creation Specifiers must the following:
frameworkImplementation
: The name of the UIMA framework in which the component
executes. The name for this implementation is given by
Constants.JAVA_FRAMEWORK_NAME
. A component that runs in the C++
enablement layer needs to have the framework name given by
Constants.CPP_FRAMEWORK_NAME
.
implementationName
: The fully-qualified Java class name of the user's component
(Annotator, CAS Consumer, Collection Reader, or CAS Initializer).
metaData
: the ResourceMetaData
describing the resourceExternalResourceDependency
objects that define this resource's dependencies
on other resources.ExternalResourceDescription
objects that satisfy the dependencies.Modifier and Type | Method and Description |
---|---|
void |
doFullValidation()
Does full validation of this
ResourceCreationSpecifier . |
void |
doFullValidation(ResourceManager aResourceManager)
Does full validation of this
ResourceCreationSpecifier . |
ExternalResourceDependency[] |
getExternalResourceDependencies()
Retrieves descriptions of this
ResourceCreationSpecifier 's dependencies on
external resources. |
ExternalResourceDependency |
getExternalResourceDependency(String aKey)
Gets the external resource dependency with the given key.
|
String |
getFrameworkImplementation()
Gets the name of the AE framework implementation within which the Resource executes.
|
String |
getImplementationName()
Retrieves the name of this
ResourceCreationSpecifier 's implementation. |
ResourceMetaData |
getMetaData()
Retrieves the
ResourceMetaData to assign to the newly constructed
ResourceCreationSpecifier . |
ResourceManagerConfiguration |
getResourceManagerConfiguration()
Retrieves the Resource Manager configuration, which declares the resources that satisfy the
dependencies defined by
getExternalResourceDependencies() . |
void |
setExternalResourceDependencies(ExternalResourceDependency[] aDependencies)
Sets the descriptions of this
ResourceCreationSpecifier 's dependencies on external
resources. |
void |
setFrameworkImplementation(String aFrameworkImplementation)
Sets the name of the AE framework implementation within which the
ResourceCreationSpecifier executes. |
void |
setImplementationName(String aImplementationName)
Sets the name of this
ResourceCreationSpecifier 's implementation. |
void |
setMetaData(ResourceMetaData aMetaData)
Sets the MetaData for this
ResourceCreationSpecifier . |
void |
setResourceManagerConfiguration(ResourceManagerConfiguration aResourceManagerConfiguration)
Sets the Resource Manager configuration, which declares the resources that satisfy the
dependencies defined by
getExternalResourceDependencies() . |
void |
validate()
Checks that this
ResourceCreationSpecifier is valid. |
void |
validate(ResourceManager aResourceManager)
Checks that this
ResourceCreationSpecifier is valid. |
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
String getFrameworkImplementation()
Constants.JAVA_FRAMEWORK_NAME
..void setFrameworkImplementation(String aFrameworkImplementation)
ResourceCreationSpecifier
executes. The framework name for this implementation is
given by Constants.JAVA_FRAMEWORK_NAME
..aFrameworkImplementation
- the framework implementation nameString getImplementationName()
ResourceCreationSpecifier
's implementation. This must
be a fully qualified Java class name.void setImplementationName(String aImplementationName)
ResourceCreationSpecifier
's implementation. This must be a
fully qualified Java class name.aImplementationName
- the implementation name of the CasConsumerResourceMetaData getMetaData()
ResourceMetaData
to assign to the newly constructed
ResourceCreationSpecifier
.void setMetaData(ResourceMetaData aMetaData)
ResourceCreationSpecifier
.aMetaData
- metadata to assignExternalResourceDependency[] getExternalResourceDependencies()
ResourceCreationSpecifier
's dependencies on
external resources. Each required external resource is assigned a String identifier. This is
the identifier that this ResourceCreationSpecifier
can use to locate the Resource
(using the
AnnotatorContext.getResourceObject(String)
method).ExternalResourceDependency
objects that describe this
AnalysisEngine's resource dependencies.void setExternalResourceDependencies(ExternalResourceDependency[] aDependencies)
ResourceCreationSpecifier
's dependencies on external
resources.aDependencies
- an array of ExternalResourceDependency
objects that describe this
ResourceCreationSpecifier
's resource dependencies.ExternalResourceDependency getExternalResourceDependency(String aKey)
aKey
- the key of the external resource dependency to getnull
if none.ResourceManagerConfiguration getResourceManagerConfiguration()
getExternalResourceDependencies()
.void setResourceManagerConfiguration(ResourceManagerConfiguration aResourceManagerConfiguration)
getExternalResourceDependencies()
.aResourceManagerConfiguration
- the Resource Manager configuration that describes how external resource dependencies
are bound to actual resources.void validate() throws ResourceInitializationException, ResourceConfigurationException
ResourceCreationSpecifier
is valid. An exception is thrown if it
is not valid. This only does fairly lightweight checking. To do a more complete but more
expensive check, use doFullValidation()
.ResourceInitializationException
- if aDesc
is invalidResourceConfigurationException
- if the configuration parameter settings in aDesc
are invalidvoid validate(ResourceManager aResourceManager) throws ResourceInitializationException, ResourceConfigurationException
ResourceCreationSpecifier
is valid. An exception is thrown if it
is not valid. This only does fairly lightweight checking. To do a more complete but more
expensive check, use doFullValidation()
.aResourceManager
- a ResourceManager instance to use to resolve imports by name.ResourceInitializationException
- if aDesc
is invalidResourceConfigurationException
- if the configuration parameter settings in aDesc
are invalidvoid doFullValidation() throws ResourceInitializationException
ResourceCreationSpecifier
. This essentially performs
all operations necessary to instantiate a Resource except that it does not actually instantiate
the implementation class. If appropriate, this method will also attempt to create a CAS based
on the descriptor, in order to do full type system verification. If any operations fail, an
exception will be thrown.ResourceInitializationException
- if validation failedvoid doFullValidation(ResourceManager aResourceManager) throws ResourceInitializationException
ResourceCreationSpecifier
. This essentially performs
all operations necessary to instantiate a Resource except that it does not actually instantiate
the implementation class. If appropriate, this method will also attempt to create a CAS based
on the descriptor, in order to do full type system verification. If any operations fail, an
exception will be thrown.aResourceManager
- a ResourceManager instance to use to load annotator classes, external resource
classes, and resolve imports by name.ResourceInitializationException
- if validation failedCopyright © 2006–2022 The Apache Software Foundation. All rights reserved.