public class ResourceCreationSpecifier_impl extends MetaDataObject_impl implements ResourceCreationSpecifier
ResourceCreationSpecifier
.MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer
serialContext
Constructor and Description |
---|
ResourceCreationSpecifier_impl() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkForDuplicateParameterNames(ConfigurationParameter[] aParams)
Checks for duplicate parameter names and throws an exception if any are found.
|
protected void |
checkForInvalidParameterOverrides(ConfigurationParameter[] aParams,
String aGroupName,
ResourceManager aResourceManager)
Checks parameter overrides and throws a ResourceInitializationException if they are invalid.
|
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
ResourceCreationSpecifier.getExternalResourceDependencies() . |
protected XmlizationInfo |
getXmlizationInfo()
To be implemented by subclasses to return information describing how to represent this object
in XML.
|
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_impl . |
void |
setResourceManagerConfiguration(ResourceManagerConfiguration aResourceManagerConfiguration)
Sets the Resource Manager configuration, which declares the resources that satisfy the
dependencies defined by
ResourceCreationSpecifier.getExternalResourceDependencies() . |
void |
validate()
Determines if the AnalysisEngineDescription is valid.
|
void |
validate(ResourceManager aResourceManager)
Checks that this
ResourceCreationSpecifier is valid. |
protected void |
validateConfigurationParameters(ResourceManager aResourceManager)
Validates configuration parameters within this Resource, and throws an exception if they are
not valid.
|
buildFromXMLElement, 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
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
public String getFrameworkImplementation()
ResourceCreationSpecifier
Constants.JAVA_FRAMEWORK_NAME
..getFrameworkImplementation
in interface ResourceCreationSpecifier
ResourceCreationSpecifier.getFrameworkImplementation()
public void setFrameworkImplementation(String aFrameworkImplementation)
ResourceCreationSpecifier
ResourceCreationSpecifier
executes. The framework name for this implementation is
given by Constants.JAVA_FRAMEWORK_NAME
..setFrameworkImplementation
in interface ResourceCreationSpecifier
aFrameworkImplementation
- the framework implementation nameResourceCreationSpecifier.setFrameworkImplementation(java.lang.String)
public String getImplementationName()
ResourceCreationSpecifier
ResourceCreationSpecifier
's implementation. This must
be a fully qualified Java class name.getImplementationName
in interface ResourceCreationSpecifier
ResourceCreationSpecifier.getImplementationName()
public void setImplementationName(String aImplementationName)
ResourceCreationSpecifier
ResourceCreationSpecifier
's implementation. This must be a
fully qualified Java class name.setImplementationName
in interface ResourceCreationSpecifier
aImplementationName
- the implementation name of the CasConsumerResourceCreationSpecifier.setImplementationName(java.lang.String)
public ResourceMetaData getMetaData()
ResourceCreationSpecifier
ResourceMetaData
to assign to the newly constructed
ResourceCreationSpecifier
.getMetaData
in interface ResourceCreationSpecifier
ResourceCreationSpecifier.getMetaData()
public void setMetaData(ResourceMetaData aMetaData)
ResourceCreationSpecifier_impl
. Users should not do
this, so this method is not published through the ResourceCreationSpecifier
interface.setMetaData
in interface ResourceCreationSpecifier
aMetaData
- metadata to assignpublic ExternalResourceDependency[] getExternalResourceDependencies()
ResourceCreationSpecifier
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).getExternalResourceDependencies
in interface ResourceCreationSpecifier
ExternalResourceDependency
objects that describe this
AnalysisEngine's resource dependencies.ResourceCreationSpecifier.getExternalResourceDependencies()
public void setExternalResourceDependencies(ExternalResourceDependency[] aDependencies)
ResourceCreationSpecifier
ResourceCreationSpecifier
's dependencies on external
resources.setExternalResourceDependencies
in interface ResourceCreationSpecifier
aDependencies
- an array of ExternalResourceDependency
objects that describe this
ResourceCreationSpecifier
's resource dependencies.ResourceCreationSpecifier.setExternalResourceDependencies(ExternalResourceDependency[])
public ExternalResourceDependency getExternalResourceDependency(String aKey)
ResourceCreationSpecifier
getExternalResourceDependency
in interface ResourceCreationSpecifier
aKey
- the key of the external resource dependency to getnull
if none.ResourceCreationSpecifier.getExternalResourceDependency(java.lang.String)
public ResourceManagerConfiguration getResourceManagerConfiguration()
ResourceCreationSpecifier
ResourceCreationSpecifier.getExternalResourceDependencies()
.getResourceManagerConfiguration
in interface ResourceCreationSpecifier
public void setResourceManagerConfiguration(ResourceManagerConfiguration aResourceManagerConfiguration)
ResourceCreationSpecifier
ResourceCreationSpecifier.getExternalResourceDependencies()
.setResourceManagerConfiguration
in interface ResourceCreationSpecifier
aResourceManagerConfiguration
- the Resource Manager configuration that describes how external resource dependencies
are bound to actual resources.public void doFullValidation() throws ResourceInitializationException
ResourceCreationSpecifier
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.doFullValidation
in interface ResourceCreationSpecifier
ResourceInitializationException
- if validation failedpublic void doFullValidation(ResourceManager aResourceManager) throws ResourceInitializationException
ResourceCreationSpecifier
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.doFullValidation
in interface ResourceCreationSpecifier
aResourceManager
- a ResourceManager instance to use to load annotator classes, external resource
classes, and resolve imports by name.ResourceInitializationException
- if validation failedpublic final void validate() throws ResourceInitializationException, ResourceConfigurationException
validate
in interface ResourceCreationSpecifier
ResourceInitializationException
- if aDesc
is invalidResourceConfigurationException
- if the configuration parameter settings in aDesc
are invalidpublic void validate(ResourceManager aResourceManager) throws ResourceInitializationException, ResourceConfigurationException
ResourceCreationSpecifier
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 ResourceCreationSpecifier.doFullValidation()
.validate
in interface ResourceCreationSpecifier
aResourceManager
- a ResourceManager instance to use to resolve imports by name.ResourceInitializationException
- if aDesc
is invalidResourceConfigurationException
- if the configuration parameter settings in aDesc
are invalidprotected void validateConfigurationParameters(ResourceManager aResourceManager) throws ResourceInitializationException
This method checks to make sure that there are no duplicate configuration group names or duplicate parameter names within groups. For aggregates, it also checks that parameter overrides are valid, and logs a warning for parameters with no overrides. (For primitives, there should be no overrides.)
aResourceManager
- used to resolve import by name. This is necessary to validate configuration parameter
overrides.ResourceInitializationException
- if the configuration parameters are invalidprotected void checkForDuplicateParameterNames(ConfigurationParameter[] aParams) throws ResourceInitializationException
aParams
- an array of ConfigurationParametersResourceInitializationException
- if there is a duplicate parameter name in the arraysprotected void checkForInvalidParameterOverrides(ConfigurationParameter[] aParams, String aGroupName, ResourceManager aResourceManager) throws ResourceInitializationException
aParams
- an array of ConfigurationParametersaGroupName
- name of groups in which these parameters are contained. Null if no groupaResourceManager
- used to resolve imports by name.ResourceInitializationException
- if there is an invalid parameter override declarationprotected XmlizationInfo getXmlizationInfo()
MetaDataObject_impl
getXmlizationInfo
in class MetaDataObject_impl
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.