Class AnalysisEngineDescription_impl
- All Implemented Interfaces:
Serializable,Cloneable,AnalysisEngineDescription,MetaDataObject,ResourceCreationSpecifier,ResourceSpecifier,XMLizable
- Direct Known Subclasses:
TaeDescription_impl
AnalysisEngineDescription. Note that this class contains two
attributes of class Map, which are not supported by the default XML input/output routines.
Therefore we override the
MetaDataObject_impl.writePropertyAsElement(PropertyXmlInfo, String) and
MetaDataObject_impl.readPropertyValueFromXMLElement(PropertyXmlInfo, Element, XMLParser, XMLParser.ParsingOptions)
methods.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringName of the "delegateAnalysisEngineSpecifiers" XML Element.protected final StringName of the "delegateAnalysisEngineSpecifiers" property.protected final StringName of the "delegateAnalysisEngineSpecifiersWithImports" property.Fields inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
serialContext -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new AnalysisEngineDescription_impl. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildFromXMLElement(Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) Overridden to set default operational properties if they are not specified in descriptor.protected booleancapabilitiesContainSofa(String aSofaName, boolean aOutput) protected voidcheckForInvalidParameterOverrides(ConfigurationParameter[] aParams, String aGroupName, ResourceManager aResourceManager) OverridesResourceCreationSpecifier_impl.checkForInvalidParameterOverrides(ConfigurationParameter[], String, ResourceManager)to validate parameter overrides in an aggregate AE.clone()Creates a clone of thisMetaDataObject.voidDoes full validation of thisResourceCreationSpecifier.voiddoFullValidation(ResourceManager aResourceManager) Does full validation of thisResourceCreationSpecifier.Override this method to include additional attributesgetAllComponentSpecifiers(ResourceManager aResourceManager) For an aggregate AnalysisEngine only, gets the ResourceSpecifiers of all components in this aggregate.Retrieves the metadata that describes the AnalysisEngine.For a primitive AnalysisEngine only, retrieves the name of the annotator implementation.Gets the ResourceSpecifier of one a component of this aggregate, based on its key.For an aggregate AnalysisEngine only, retrieves a collection ofResourceSpecifiers that indicate which delegate AnalysisEngines comprise the aggregate.getDelegateAnalysisEngineSpecifiers(ResourceManager aResourceManager) For an aggregate AnalysisEngine only, retrieves a collection ofResourceSpecifiers that indicate which delegate AnalysisEngines comprise the aggregate.Retrieves a Map whose keys are string identifiers and whose values are the eitherImportorResourceSpecifierobjects.For an aggregate AnalysisEngine only, gets the declaration of which FlowController should be used by the AnalysisEngine.Gets the name of the AE framework implementation within which the Resource executes.protected XmlizationInfoTo be implemented by subclasses to return information describing how to represent this object in XML.protected static XmlizationInfoStatic method to get XmlizationInfo, used by subclasses to set up their own XmlizationInfo.booleanRetrieves whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).Deprecated.never called anymore - getAdditionalAttributes called insteadprotected voidreadPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo, Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) Overridden to handle XML import of the DelegateAnalysisEngineSpecifiers attribute.protected voidresolveDelegateAnalysisEngineImports(Collection<String> aEnclosingAggregateAeUrls, ResourceManager aResourceManager, boolean aRecursive) Resolves imports of delegate Analysis Engines.protected voidresolveDelegateAnalysisEngineImports(ResourceManager aResourceManager, boolean aRecursive) Resolves imports of delegate Analysis Engines.voidresolveImports(Collection<String> aAlreadyImportedDelegateAeUrls, ResourceManager aResourceManager) Resolves all import declarations in this AnalysisEngineDescription.voidresolveImports(ResourceManager aResourceManager) Resolves all import declarations in this AnalysisEngineDescription.voidsetAnnotatorImplementationName(String aImplementationName) For a primitive AnalysisEngine only, sets the name of the annotator implementation.voidsetFlowControllerDeclaration(FlowControllerDeclaration aFlowControllerDeclaration) For an aggregate AnalysisEngine only, sets the declaration of which FlowController should be used by the AnalysisEngine.voidsetFrameworkImplementation(String aFrameworkImplementation) Sets the name of the AE framework implementation within which theResourceCreationSpecifierexecutes.voidsetPrimitive(boolean aPrimitive) Sets whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).voidsetSofaMappings(SofaMapping[] aSofaMappings) voidtoXML(OutputStream aOutputStream, boolean aPreserveDelegateAnalysisEngineImports) Writes this object's XML representation as a string in UTF-8 encoding.voidWrites this object's XML representation as a string.voidtoXML(ContentHandler aContentHandler, boolean aWriteDefaultNamespaceAttribute, boolean aPreserveDelegateAnalysisEngineImports) Writes this object's XML representation by making calls on a SAXContentHandler.voidvalidate(ResourceManager aResourceManager) Determines if the AnalysisEngineDescription is valid.protected voidValidate SofA mappings and inputs/outputs for an aggregate AE.protected voidwritePropertyAsElement(PropertyXmlInfo aPropInfo, String aNamespace) Overridden to handle XML export of the DelegateAnalysisEngineSpecifiers attribute.Methods inherited from class org.apache.uima.resource.impl.ResourceCreationSpecifier_impl
checkForDuplicateParameterNames, getExternalResourceDependencies, getExternalResourceDependency, getImplementationName, getMetaData, getResourceManagerConfiguration, setExternalResourceDependencies, setImplementationName, setMetaData, setResourceManagerConfiguration, validate, validateConfigurationParametersMethods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, equals, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXmlMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, setAttributeValue, setSourceUrlMethods inherited from interface org.apache.uima.resource.ResourceCreationSpecifier
getExternalResourceDependencies, getExternalResourceDependency, getImplementationName, getMetaData, getResourceManagerConfiguration, setExternalResourceDependencies, setImplementationName, setMetaData, setResourceManagerConfiguration, validate
-
Field Details
-
PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS
Name of the "delegateAnalysisEngineSpecifiers" property. Change this if interface changes.- See Also:
-
PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS_WITH_IMPORTS
Name of the "delegateAnalysisEngineSpecifiersWithImports" property. Change this if interface changes.- See Also:
-
ELEM_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS
Name of the "delegateAnalysisEngineSpecifiers" XML Element. Change this if schema changes.- See Also:
-
-
Constructor Details
-
AnalysisEngineDescription_impl
public AnalysisEngineDescription_impl()Creates a new AnalysisEngineDescription_impl. Initializes the MetaData, DelegateAnalysisEngineSpecifiers, and ExternalResourcesRequired attributes.
-
-
Method Details
-
getFrameworkImplementation
Description copied from interface:ResourceCreationSpecifierGets the name of the AE framework implementation within which the Resource executes. The framework name for this implementation is given byConstants.JAVA_FRAMEWORK_NAME..- Specified by:
getFrameworkImplementationin interfaceAnalysisEngineDescription- Specified by:
getFrameworkImplementationin interfaceResourceCreationSpecifier- Overrides:
getFrameworkImplementationin classResourceCreationSpecifier_impl- Returns:
- the framework implementation name
- See Also:
-
setFrameworkImplementation
Description copied from interface:ResourceCreationSpecifierSets the name of the AE framework implementation within which theResourceCreationSpecifierexecutes. The framework name for this implementation is given byConstants.JAVA_FRAMEWORK_NAME..- Specified by:
setFrameworkImplementationin interfaceAnalysisEngineDescription- Specified by:
setFrameworkImplementationin interfaceResourceCreationSpecifier- Overrides:
setFrameworkImplementationin classResourceCreationSpecifier_impl- Parameters:
aFrameworkImplementation- the framework implementation name- See Also:
-
isPrimitive
public boolean isPrimitive()Description copied from interface:AnalysisEngineDescriptionRetrieves whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).Some of the methods on this class apply only to one type of AnalysisEngine:
AnalysisEngineDescription.getAnnotatorImplementationName()- primitive AnalysisEngine only
AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers()- aggregate AnalysisEngine only
AnalysisEngineDescription.getFlowControllerDeclaration()- aggregate AnalysisEngine only
- Specified by:
isPrimitivein interfaceAnalysisEngineDescription- Returns:
- true if and only if the AnalysisEngine is primitive
- See Also:
-
setPrimitive
public void setPrimitive(boolean aPrimitive) Description copied from interface:AnalysisEngineDescriptionSets whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).- Specified by:
setPrimitivein interfaceAnalysisEngineDescription- Parameters:
aPrimitive- true if and only if the AnalysisEngine is primitive- See Also:
-
getAnnotatorImplementationName
Description copied from interface:AnalysisEngineDescriptionFor a primitive AnalysisEngine only, retrieves the name of the annotator implementation. For Java annotators, this will be a fully qualified Java class name.- Specified by:
getAnnotatorImplementationNamein interfaceAnalysisEngineDescription- Returns:
- the implementation name of the annotator. If the AnalysisEngine is aggregate, always
returns
null. - See Also:
-
setAnnotatorImplementationName
Description copied from interface:AnalysisEngineDescriptionFor a primitive AnalysisEngine only, sets the name of the annotator implementation. For Java annotators, this must be a fully qualified Java class name.- Specified by:
setAnnotatorImplementationNamein interfaceAnalysisEngineDescription- Parameters:
aImplementationName- the implementation name of the annotator.- See Also:
-
getDelegateAnalysisEngineSpecifiers
public Map<String,ResourceSpecifier> getDelegateAnalysisEngineSpecifiers() throws InvalidXMLExceptionDescription copied from interface:AnalysisEngineDescriptionFor an aggregate AnalysisEngine only, retrieves a collection ofResourceSpecifiers that indicate which delegate AnalysisEngines comprise the aggregate. EachResourceSpecifiercan either:- completely describe how to build a AnalysisEngine instance
- describe how to locate a distributed AnalysisEngine service, for example a specific endpoint or a JNDI name
This method returns an unmodifiable Map whose keys are string identifiers and whose values are the
ResourceSpecifierobjects. The string identifiers in this Map are to refer to the delegate AnalysisEngines from elsewhere in thisAnalysisEngineDescription. (For example in theFlowConstraintsdescription.)Note that the Map returned by this method will never contain
Importobjects -- they will always be resolved first. If you want to get access to the original Import objects, useAnalysisEngineDescription.getDelegateAnalysisEngineSpecifiersWithImports(). Also use that method if you want to be able to make changes to the Map.- Specified by:
getDelegateAnalysisEngineSpecifiersin interfaceAnalysisEngineDescription- Returns:
- an unmodifiable Map with
Stringkeys andResourceSpecifiervalues. - Throws:
InvalidXMLException- if import resolution failed- See Also:
-
getDelegateAnalysisEngineSpecifiers
public Map<String,ResourceSpecifier> getDelegateAnalysisEngineSpecifiers(ResourceManager aResourceManager) throws InvalidXMLException Description copied from interface:AnalysisEngineDescriptionFor an aggregate AnalysisEngine only, retrieves a collection ofResourceSpecifiers that indicate which delegate AnalysisEngines comprise the aggregate. EachResourceSpecifiercan either:- completely describe how to build a AnalysisEngine instance
- describe how to locate a distributed AnalysisEngine service, for example a specific endpoint or a JNDI name
This method returns an unmodifiable Map whose keys are string identifiers and whose values are the
ResourceSpecifierobjects. The string identifiers in this Map are to refer to the delegate AnalysisEngines from elsewhere in thisAnalysisEngineDescription. (For example in theFlowConstraintsdescription.)Note that the Map returned by this method will never contain
Importobjects -- they will always be resolved first. If you want to get access to the original Import objects, useAnalysisEngineDescription.getDelegateAnalysisEngineSpecifiersWithImports(). Also use that method if you want to be able to make changes to the Map.- Specified by:
getDelegateAnalysisEngineSpecifiersin interfaceAnalysisEngineDescription- Parameters:
aResourceManager- the ResourceManager to use to get the datapath needed to resolve imports- Returns:
- an unmodifiable Map with
Stringkeys andResourceSpecifiervalues. - Throws:
InvalidXMLException- if import resolution failed- See Also:
-
getDelegateAnalysisEngineSpecifiersWithImports
Description copied from interface:AnalysisEngineDescriptionRetrieves a Map whose keys are string identifiers and whose values are the eitherImportorResourceSpecifierobjects. These indicate the delegate AnalysisEngines that comprise the aggregate.This is a direct representation of what is in the XML syntax for the descriptor. That is, if the XML had an <import> element, the Map will contain an
Importobject. If you do not want to deal with imports, use theAnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers()method instead.- Specified by:
getDelegateAnalysisEngineSpecifiersWithImportsin interfaceAnalysisEngineDescription- Returns:
- a Map with
Stringkeys andResourceSpecifierorImportobjects as values. This Map may be modified to add or remove imports or specifiers. - See Also:
-
getFlowControllerDeclaration
Description copied from interface:AnalysisEngineDescriptionFor an aggregate AnalysisEngine only, gets the declaration of which FlowController should be used by the AnalysisEngine.- Specified by:
getFlowControllerDeclarationin interfaceAnalysisEngineDescription- Returns:
- an object containing either an import of a ResourceSpecifier or a ResourceSpecifier itself. This specifier will be used to create the FlowController.
-
setFlowControllerDeclaration
Description copied from interface:AnalysisEngineDescriptionFor an aggregate AnalysisEngine only, sets the declaration of which FlowController should be used by the AnalysisEngine.- Specified by:
setFlowControllerDeclarationin interfaceAnalysisEngineDescription- Parameters:
aFlowControllerDeclaration- an object containing either an import of a ResourceSpecifier or a ResourceSpecifier itself. This specifier will be used to create the FlowController.
-
getAllComponentSpecifiers
public Map<String,ResourceSpecifier> getAllComponentSpecifiers(ResourceManager aResourceManager) throws InvalidXMLException Description copied from interface:AnalysisEngineDescriptionFor an aggregate AnalysisEngine only, gets the ResourceSpecifiers of all components in this aggregate. This includes the FlowController as well as all of the component AnalysisEngines.This method returns an unmodifiable Map whose keys are string identifiers and whose values are the
ResourceSpecifierobjects. The string identifiers in this Map are to refer to the components from elsewhere in this aggregate descriptor, for example in configuration parameter overrides and resource bindings.Note that the Map returned by this method will never contain
Importobjects -- they will always be resolved first. If you want to get access to the original Import objects, useAnalysisEngineDescription.getDelegateAnalysisEngineSpecifiersWithImports()andAnalysisEngineDescription.getFlowControllerDeclaration(). Also use those methods if you want to make changes to be able to make changes to the Map.- Specified by:
getAllComponentSpecifiersin interfaceAnalysisEngineDescription- Parameters:
aResourceManager- the ResourceManager from which to get the datapath needed to resolve imports. Pass null to use the default ResourceManager.- Returns:
- an unmodifiable Map with
Stringkeys andResourceSpecifiervalues. - Throws:
InvalidXMLException- if import resolution failed
-
getAnalysisEngineMetaData
Description copied from interface:AnalysisEngineDescriptionRetrieves the metadata that describes the AnalysisEngine. This includes the AnalysisEngine's capabilties, the TypeSystem that is uses, the specified Flow information for an aggregate AnalysisEngine, and various informational attributes such as name, description, version, vendor, and copyright.- Specified by:
getAnalysisEngineMetaDatain interfaceAnalysisEngineDescription- Returns:
- the
AnalysisEngineMetaDataobject containing the AnalysisEngine's metadata. This object can be modified. - See Also:
-
getSofaMappings
- Specified by:
getSofaMappingsin interfaceAnalysisEngineDescription
-
setSofaMappings
- Specified by:
setSofaMappingsin interfaceAnalysisEngineDescription
-
doFullValidation
Description copied from interface:ResourceCreationSpecifierDoes full validation of thisResourceCreationSpecifier. 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.- Specified by:
doFullValidationin interfaceAnalysisEngineDescription- Specified by:
doFullValidationin interfaceResourceCreationSpecifier- Overrides:
doFullValidationin classResourceCreationSpecifier_impl- Throws:
ResourceInitializationException- if validation failed
-
doFullValidation
public void doFullValidation(ResourceManager aResourceManager) throws ResourceInitializationException Description copied from interface:ResourceCreationSpecifierDoes full validation of thisResourceCreationSpecifier. 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.- Specified by:
doFullValidationin interfaceAnalysisEngineDescription- Specified by:
doFullValidationin interfaceResourceCreationSpecifier- Overrides:
doFullValidationin classResourceCreationSpecifier_impl- Parameters:
aResourceManager- a ResourceManager instance to use to load annotator classes, external resource classes, and resolve imports by name.- Throws:
ResourceInitializationException- if validation failed
-
validate
public void validate(ResourceManager aResourceManager) throws ResourceInitializationException, ResourceConfigurationException Determines if the AnalysisEngineDescription is valid. An exception is thrown if it is not valid. This should be called from this Analysis Engine's initialize method. Note this does not check configuration parameter settings - that must be done by an explicit call to validateConfigurationParameterSettings.- Specified by:
validatein interfaceResourceCreationSpecifier- Overrides:
validatein classResourceCreationSpecifier_impl- Parameters:
aResourceManager- a ResourceManager instance to use to resolve imports by name.- Throws:
ResourceInitializationException- ifaDescis invalidResourceConfigurationException- if the configuration parameter settings inaDescare invalid
-
checkForInvalidParameterOverrides
protected void checkForInvalidParameterOverrides(ConfigurationParameter[] aParams, String aGroupName, ResourceManager aResourceManager) throws ResourceInitializationException OverridesResourceCreationSpecifier_impl.checkForInvalidParameterOverrides(ConfigurationParameter[], String, ResourceManager)to validate parameter overrides in an aggregate AE. Also logs a warning for aggregate parameters with no declared overrides.- Overrides:
checkForInvalidParameterOverridesin classResourceCreationSpecifier_impl- Parameters:
aParams- an array of ConfigurationParametersaGroupName- name of groups in which these parameters are contained. Null if no groupaResourceManager- a ResourceManager instance to use to resolve imports by name.- Throws:
ResourceInitializationException- if there is an invalid parameter override declaration
-
getComponentSpecifier
Gets the ResourceSpecifier of one a component of this aggregate, based on its key. This may be the specifier of a component (i.e. delegate) AnalysisEngine, or it may be the specifier of the FlowController.- Specified by:
getComponentSpecifierin interfaceAnalysisEngineDescription- Parameters:
key- the key of the component specifier to get- Returns:
- the specifier for the component, null if there is no component with the given key
- Throws:
ResourceInitializationException- if there's a problem resolving imports
-
validateSofaMappings
Validate SofA mappings and inputs/outputs for an aggregate AE.- Throws:
ResourceInitializationException- -
-
capabilitiesContainSofa
-
getAdditionalAttributes
Description copied from class:MetaDataObject_implOverride this method to include additional attributes- Overrides:
getAdditionalAttributesin classMetaDataObject_impl- Returns:
- additional attributes
-
listAttributes
Deprecated.never called anymore - getAdditionalAttributes called insteadOverridden to add Delegate AE Specifiers to the result list. Default introspection implementation won't return it because it has no set method. We've also overridden the XML import/export methods, though, so that set methods are not required.- Specified by:
listAttributesin interfaceMetaDataObject- Overrides:
listAttributesin classMetaDataObject_impl- Returns:
- a List containing
NameClassPairobjects, each of which contains the name of a parameter and the Class of its value. For primitive types, the wrapper classes will be returned (e.g.java.lang.Integerinstead of int). - See Also:
-
toXML
public void toXML(OutputStream aOutputStream, boolean aPreserveDelegateAnalysisEngineImports) throws SAXException, IOException Description copied from interface:AnalysisEngineDescriptionWrites this object's XML representation as a string in UTF-8 encoding.- Specified by:
toXMLin interfaceAnalysisEngineDescription- Parameters:
aOutputStream- an OutputStream to which the XML string will be written, in UTF-8 encoding.aPreserveDelegateAnalysisEngineImports- if true, XML serialization will always preserve <import> elements used to import delegate analysis engine specifiers into an aggregate. If false, the default import serialization behavior applies, which is to write <import> elements only in the case where they have not previously been resolved.- Throws:
SAXException- if a SAX exception occursIOException- if an I/O failure occurs
-
toXML
public void toXML(Writer aWriter, boolean aPreserveDelegateAnalysisEngineImports) throws SAXException, IOException Description copied from interface:AnalysisEngineDescriptionWrites this object's XML representation as a string. Note that if you want to write the XML to a file, it is highly recommended that you useXMLizable.toXML(OutputStream)instead, as it ensures that output is written in UTF-8 encoding, which is the default encoding that should be used for XML files.- Specified by:
toXMLin interfaceAnalysisEngineDescription- Parameters:
aWriter- a Writer to which the XML string will be writtenaPreserveDelegateAnalysisEngineImports- if true, XML serialization will always preserve <import> elements used to import delegate analysis engine specifiers into an aggregate. If false, the default import serialization behavior applies, which is to write <import> elements only in the case where they have not previously been resolved.- Throws:
SAXException- if a SAX exception occursIOException- if an I/O failure occurs
-
toXML
public void toXML(ContentHandler aContentHandler, boolean aWriteDefaultNamespaceAttribute, boolean aPreserveDelegateAnalysisEngineImports) throws SAXException Description copied from interface:AnalysisEngineDescriptionWrites this object's XML representation by making calls on a SAXContentHandler.- Specified by:
toXMLin interfaceAnalysisEngineDescription- Parameters:
aContentHandler- the content handler to which this object will write events that describe its XML representation.aWriteDefaultNamespaceAttribute- whether the namespace of this element should be written as the default namespace. This should be done only for the root element, and it defaults to false.aPreserveDelegateAnalysisEngineImports- if true, XML serialization will always preserve <import> elements used to import delegate analysis engine specifiers into an aggregate. If false, the default import serialization behavior applies, which is to write <import> elements only in the case where they have not previously been resolved.- Throws:
SAXException- if a SAX exception occurs
-
resolveImports
Description copied from interface:AnalysisEngineDescriptionResolves all import declarations in this AnalysisEngineDescription. For an aggregate, this is recursive, also resolving all imports in each delegate AnalysisEngine. Users do not typically need to call this method; it is called automatically whenUIMAFramework.produceAnalysisEngine(ResourceSpecifier)is called.- Specified by:
resolveImportsin interfaceAnalysisEngineDescription- Parameters:
aResourceManager- the Resource Manager used to locate imports by name. For example, the path in which to locate these imported descriptors can be set via theResourceManager.setDataPath(String)method.- Throws:
InvalidXMLException- if an import target does not exist or is invalid
-
resolveImports
public void resolveImports(Collection<String> aAlreadyImportedDelegateAeUrls, ResourceManager aResourceManager) throws InvalidXMLException Description copied from interface:AnalysisEngineDescriptionResolves all import declarations in this AnalysisEngineDescription. For an aggregate, this is recursive, also resolving all imports in each delegate AnalysisEngine. Users do not typically need to call this method; it is called automatically whenUIMAFramework.produceAnalysisEngine(ResourceSpecifier)is called.This version is used internally to resolve nested imports.
- Specified by:
resolveImportsin interfaceAnalysisEngineDescription- Parameters:
aAlreadyImportedDelegateAeUrls- URLs of already imported AE descriptors, so we don't import them again.aResourceManager- the Resource Manager used to locate imports by name. For example, the path in which to locate these imported descriptors can be set via theResourceManager.setDataPath(String)method.- Throws:
InvalidXMLException- if an import target does not exist or is invalid
-
resolveDelegateAnalysisEngineImports
protected void resolveDelegateAnalysisEngineImports(ResourceManager aResourceManager, boolean aRecursive) throws InvalidXMLException Resolves imports of delegate Analysis Engines. This reads from the delegateAnalysisEngineSpecifiersWithImports map and populates the delegateAnalysisEngineSpecifiers map.- Parameters:
aResourceManager- -aRecursive- If true, this method will callresolveImports(Collection, ResourceManager)on each delegate. If a cirular import is found, an exception will be thrown.- Throws:
InvalidXMLException- -
-
resolveDelegateAnalysisEngineImports
protected void resolveDelegateAnalysisEngineImports(Collection<String> aEnclosingAggregateAeUrls, ResourceManager aResourceManager, boolean aRecursive) throws InvalidXMLException Resolves imports of delegate Analysis Engines. This reads from the delegateAnalysisEngineSpecifiersWithImports map and populates the delegateAnalysisEngineSpecifiers map.- Parameters:
aEnclosingAggregateAeUrls- URLs of enclosing aggregate AEs. Used to detect circular imports.aResourceManager- -aRecursive- If true, this method will callresolveImports(Collection, ResourceManager)on each delegate. If a circular import is found, an exception will be thrown.- Throws:
InvalidXMLException- -
-
clone
Description copied from interface:MetaDataObjectCreates a clone of thisMetaDataObject. This performs a "deep" copy by cloning all attribute values that are also MetaDataObjects.- Specified by:
clonein interfaceMetaDataObject- Overrides:
clonein classMetaDataObject_impl- Returns:
- a clone of this
MetaDataObject - See Also:
-
writePropertyAsElement
protected void writePropertyAsElement(PropertyXmlInfo aPropInfo, String aNamespace) throws SAXException Overridden to handle XML export of the DelegateAnalysisEngineSpecifiers attribute. This attribute has a value of typeMap, which is not handled by the default XML export logic.- Overrides:
writePropertyAsElementin classMetaDataObject_impl- Parameters:
aPropInfo- -aNamespace- -- Throws:
SAXException- -- See Also:
-
readPropertyValueFromXMLElement
protected void readPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo, Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Overridden to handle XML import of the DelegateAnalysisEngineSpecifiers attribute. This attribute has a value of typeMap, which is not handled by the default XML import logic.- Overrides:
readPropertyValueFromXMLElementin classMetaDataObject_impl- Parameters:
aPropXmlInfo- information about the property to readaElement- DOM element to read fromaParser- parser to use to construct complex valuesaOptions- option settings- Throws:
InvalidXMLException- -- See Also:
-
buildFromXMLElement
public void buildFromXMLElement(Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Overridden to set default operational properties if they are not specified in descriptor.- Specified by:
buildFromXMLElementin interfaceXMLizable- Overrides:
buildFromXMLElementin classMetaDataObject_impl- Parameters:
aElement- -aParser- -aOptions- -- Throws:
InvalidXMLException- -
-
getXmlizationInfo
Description copied from class:MetaDataObject_implTo be implemented by subclasses to return information describing how to represent this object in XML.- Overrides:
getXmlizationInfoin classResourceCreationSpecifier_impl- Returns:
- information defining this object's XML representation
-
getXmlizationInfoForClass
Static method to get XmlizationInfo, used by subclasses to set up their own XmlizationInfo.- Returns:
- XmlizationInfo, used by subclasses to set up their own XmlizationInfo
-