org.apache.uima.analysis_engine.metadata.impl
Class AnalysisEngineMetaData_impl

java.lang.Object
  extended by org.apache.uima.resource.metadata.impl.MetaDataObject_impl
      extended by org.apache.uima.resource.metadata.impl.ResourceMetaData_impl
          extended by org.apache.uima.analysis_engine.metadata.impl.AnalysisEngineMetaData_impl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, AnalysisEngineMetaData, MetaDataObject, ProcessingResourceMetaData, ResourceMetaData, XMLizable
Direct Known Subclasses:
ProcessingResourceMetaData_impl

public class AnalysisEngineMetaData_impl
extends ResourceMetaData_impl
implements AnalysisEngineMetaData

Reference implementation of AnalysisEngineMetaData.

See Also:
Serialized Form

Constructor Summary
AnalysisEngineMetaData_impl()
           
 
Method Summary
 void _setDelegateAnalysisEngineMetaData(AnalysisEngineMetaData[] aMetaData)
          Used internally to set the AnalysisEngine metadata.
 Capability[] getCapabilities()
          Retrieves this Processing Resource's Capabilities.
 AnalysisEngineMetaData[] getDelegateAnalysisEngineMetaData()
          For an aggregate AnalysisEngine only, gets the metadata of the delegate AnalysisEngines.
 FlowConstraints getFlowConstraints()
          For an aggregate AnalysisEngine only, gets the constraints on the execution sequence of the delegate AnalysisEngines within the aggregate.
 FsIndexCollection getFsIndexCollection()
          Retrieves the FS Index collection used by this Processing Resource.
 FsIndexDescription[] getFsIndexes()
          Retrieves the Feature Structure indexes by this Processing Resource.
 OperationalProperties getOperationalProperties()
          Gets this Processing Resource's OperationalProperties.
 TypePriorities getTypePriorities()
          Retrieves the Type Priorites for this Processing Resource.
 TypeSystemDescription getTypeSystem()
          Retrieves the Type System used by this Processing 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.
 boolean isAsynchronousModeSupported()
          Determines if this AnalysisEngine supports asynchronous communication.
 boolean isSofaAware()
          Gets whether this AE is sofa-aware.
protected  void readPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo, org.w3c.dom.Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions)
          Utility method to read an attribute's value from its DOM representation.
protected  void readUnknownPropertyValueFromXMLElement(org.w3c.dom.Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions, java.util.List<java.lang.String> aKnownPropertyNames)
          Utility method that attempts to read a property value from an XML element even though it is not known to which property the value should be assigned.
 void resolveImports()
          Resolves any import declarations throughout this metadata.
 void resolveImports(ResourceManager aResourceManager)
          Resolves any import declarations throughout this metadata.
 void setAsynchronousModeSupported(boolean aSupported)
          Sets whether this AnalysisEngine supports asynchronous communication.
 void setCapabilities(Capability[] aCapabilities)
          Sets this Processing Resource's Capabilities.
 void setFlowConstraints(FlowConstraints aFlowConstraints)
          For an aggregate AnalysisEngine only, sets the constraints on the execution sequence of the delegate AnalysisEngines within the aggregate.Flow constraints are optional.
 void setFsIndexCollection(FsIndexCollection aFsIndexCollection)
          Sets the Feature Structure Index collection used by this Processing Resource.
 void setFsIndexes(FsIndexDescription[] aFsIndexes)
          Sets the Feature Structure indexes by this Processing Resource.
 void setOperationalProperties(OperationalProperties aOperationalProperties)
          Sets this Processing Resource's OperationalProperties.
 void setTypePriorities(TypePriorities aTypePriorities)
          Retrieves the Type Priorites for this Processing Resource.
 void setTypeSystem(TypeSystemDescription aTypeSystem)
          Retrieves the Type System used by this Processing Resource.
protected  void writePropertyAsElement(PropertyXmlInfo aPropInfo, java.lang.String aNamespace, org.xml.sax.ContentHandler aContentHandler)
          Utility method used to write a property out as an XML element.
 
Methods inherited from class org.apache.uima.resource.metadata.impl.ResourceMetaData_impl
buildFromXMLElement, getClassForParameterType, getConfigurationParameterDeclarations, getConfigurationParameterSettings, getCopyright, getDescription, getName, getUUID, getVendor, getVersion, setConfigurationParameterDeclarations, setConfigurationParameterSettings, setCopyright, setDescription, setName, setUUID, setVendor, setVersion, validateConfigurationParameterDataTypeMatch, validateConfigurationParameterSettings, validateConfigurationParameterSettings
 
Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, clone, equals, getAttributeClass, getAttributeValue, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, setAttributeValue, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, writeArrayPropertyAsElement, writeMapPropertyToXml
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.uima.resource.metadata.ResourceMetaData
getConfigurationParameterDeclarations, getConfigurationParameterSettings, getCopyright, getDescription, getName, getUUID, getVendor, getVersion, setConfigurationParameterDeclarations, setConfigurationParameterSettings, setCopyright, setDescription, setName, setUUID, setVendor, setVersion, validateConfigurationParameterSettings
 
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
 

Constructor Detail

AnalysisEngineMetaData_impl

public AnalysisEngineMetaData_impl()
Method Detail

resolveImports

public void resolveImports()
                    throws InvalidXMLException
Description copied from interface: ResourceMetaData
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.

Specified by:
resolveImports in interface ProcessingResourceMetaData
Specified by:
resolveImports in interface ResourceMetaData
Overrides:
resolveImports in class ResourceMetaData_impl
Throws:
InvalidXMLException - if either the import target does not exist or is invalid

resolveImports

public void resolveImports(ResourceManager aResourceManager)
                    throws InvalidXMLException
Description copied from interface: ResourceMetaData
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.

Specified by:
resolveImports in interface ProcessingResourceMetaData
Specified by:
resolveImports in interface ResourceMetaData
Overrides:
resolveImports in class ResourceMetaData_impl
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 the ResourceManager.setDataPath(String) method.
Throws:
InvalidXMLException - if either the import target does not exist or is invalid

getCapabilities

public Capability[] getCapabilities()
Description copied from interface: ProcessingResourceMetaData
Retrieves this Processing Resource's Capabilities. Each capability consists of a set of features or types that this Resource inputs and outputs, along with the preconditions (e.g. language or mime type) on the input Entity.

Specified by:
getCapabilities in interface ProcessingResourceMetaData
Returns:
an array of Capabilities.
See Also:
org.apache.uima.resource.metadata.AnalysisEngineMetaData#getCapabilities()

setCapabilities

public void setCapabilities(Capability[] aCapabilities)
Description copied from interface: ProcessingResourceMetaData
Sets this Processing Resource's Capabilities. Each capability consists of a set of features or types that this Resource inputs and outputs, along with the preconditions (e.g. language or mime type) on the input Entity.

Specified by:
setCapabilities in interface ProcessingResourceMetaData
Parameters:
aCapabilities - an array of Capabilities.
See Also:
org.apache.uima.resource.metadata.AnalysisEngineMetaData#setCapabilities(Capability[])

getTypeSystem

public TypeSystemDescription getTypeSystem()
Description copied from interface: ProcessingResourceMetaData
Retrieves the Type System used by this Processing Resource. The Type System contains TypeDescriptions and FeatureDescriptions that are the inputs and/or outputs of this Resource. Some Processing Resources, such as aggregate analysis engines, may not contain a type system and return null.

Specified by:
getTypeSystem in interface ProcessingResourceMetaData
Returns:
a description of the type system used by this Resource
See Also:
org.apache.uima.resource.metadata.AnalysisEngineMetaData#getTypeSystem()

setTypeSystem

public void setTypeSystem(TypeSystemDescription aTypeSystem)
Description copied from interface: ProcessingResourceMetaData
Retrieves the Type System used by this Processing Resource. The Type System contains TypeDescriptions and FeatureDescriptions that are the inputs and/or outputs of this Resource.

Specified by:
setTypeSystem in interface ProcessingResourceMetaData
Parameters:
aTypeSystem - a description of the type system used by this Resource.
See Also:
org.apache.uima.resource.metadata.AnalysisEngineMetaData#setTypeSystem(TypeSystemDescription)

getTypePriorities

public TypePriorities getTypePriorities()
Description copied from interface: ProcessingResourceMetaData
Retrieves the Type Priorites for this Processing Resource. Type Priorities may be used to determine the sort order of CAS indexes - see ProcessingResourceMetaData.getFsIndexes().

Specified by:
getTypePriorities in interface ProcessingResourceMetaData
Returns:
the Type Priorities for Resource
See Also:
org.apache.uima.resource.metadata.AnalysisEngineMetaData#getTypePriorities()

setTypePriorities

public void setTypePriorities(TypePriorities aTypePriorities)
Description copied from interface: ProcessingResourceMetaData
Retrieves the Type Priorites for this Processing Resource. Type Priorities may be used to determine the sort order of CAS indexes - see ProcessingResourceMetaData.getFsIndexes().

Specified by:
setTypePriorities in interface ProcessingResourceMetaData
Parameters:
aTypePriorities - the Type Priorities for this Resource
See Also:
org.apache.uima.resource.metadata.AnalysisEngineMetaData#setTypePriorities(org.apache.uima.analysis_engine.metadata.TypePriorities)

getFsIndexCollection

public FsIndexCollection getFsIndexCollection()
Description copied from interface: ProcessingResourceMetaData
Retrieves the FS Index collection used by this Processing Resource. FS Indexes are used to iterate over annotations in the CAS.

Specified by:
getFsIndexCollection in interface ProcessingResourceMetaData
Returns:
a description of the Feature Structure indexes used by this Resource.

setFsIndexCollection

public void setFsIndexCollection(FsIndexCollection aFsIndexCollection)
Description copied from interface: ProcessingResourceMetaData
Sets the Feature Structure Index collection used by this Processing Resource. FS Indexes are used to iterate over annotations in the CAS.

Specified by:
setFsIndexCollection in interface ProcessingResourceMetaData
Parameters:
aFsIndexCollection - a description of the Feature Structure indexes used by this Resource.

getFsIndexes

public FsIndexDescription[] getFsIndexes()
Description copied from interface: ProcessingResourceMetaData
Retrieves the Feature Structure indexes by this Processing Resource. These are used to iterate over annotations in the CAS.

NOTE: this method predates the FsIndexCollection object, which may define additional information (name, description, vendor, version) and import other FsIndexCollections, and provides direct access to the FsIndexDescription objects. To access the FsIndexCollection object, call ProcessingResourceMetaData.getFsIndexCollection().

Specified by:
getFsIndexes in interface ProcessingResourceMetaData
Returns:
a description of the Feature Structure indexes used by this Resource.
See Also:
org.apache.uima.resource.metadata.AnalysisEngineMetaData#getFsIndexes()

setFsIndexes

public void setFsIndexes(FsIndexDescription[] aFsIndexes)
Description copied from interface: ProcessingResourceMetaData
Sets the Feature Structure indexes by this Processing Resource. These are used to iterate over annotations in the CAS.

NOTE: this method predates the FsIndexCollection object, which may define additional information (name, description, vendor, version) and import other FsIndexCollections, and provides direct access to the FsIndexDescription objects. To access the FsIndexCollection object, call ProcessingResourceMetaData.getFsIndexCollection().

Specified by:
setFsIndexes in interface ProcessingResourceMetaData
Parameters:
aFsIndexes - a description of the Feature Structure indexes used by this Resource.
See Also:
org.apache.uima.resource.metadata.AnalysisEngineMetaData#setFsIndexes(FsIndexDescription[])

getOperationalProperties

public OperationalProperties getOperationalProperties()
Description copied from interface: ProcessingResourceMetaData
Gets this Processing Resource's OperationalProperties. This includes information such as whether this component will modify the CAS, and whether multiple instances of this component can be run in parallel.

Specified by:
getOperationalProperties in interface ProcessingResourceMetaData
Returns:
operational properties for this component

setOperationalProperties

public void setOperationalProperties(OperationalProperties aOperationalProperties)
Description copied from interface: ProcessingResourceMetaData
Sets this Processing Resource's OperationalProperties. This includes information such as whether this component will modify the CAS, and whether multiple instances of this component can be run in parallel.

Specified by:
setOperationalProperties in interface ProcessingResourceMetaData
Parameters:
aOperationalProperties - operational properties for this component

writePropertyAsElement

protected void writePropertyAsElement(PropertyXmlInfo aPropInfo,
                                      java.lang.String aNamespace,
                                      org.xml.sax.ContentHandler aContentHandler)
                               throws org.xml.sax.SAXException
Description copied from class: MetaDataObject_impl
Utility method used to write a property out as an XML element.

Overrides:
writePropertyAsElement in class MetaDataObject_impl
Parameters:
aPropInfo - information on how to represent the property in XML
aNamespace - XML namespace URI for this object
aContentHandler - content handler to which this object will send events that describe its XML representation
Throws:
org.xml.sax.SAXException

readPropertyValueFromXMLElement

protected void readPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo,
                                               org.w3c.dom.Element aElement,
                                               XMLParser aParser,
                                               XMLParser.ParsingOptions aOptions)
                                        throws InvalidXMLException
Description copied from class: MetaDataObject_impl
Utility method to read an attribute's value from its DOM representation.

Overrides:
readPropertyValueFromXMLElement in class MetaDataObject_impl
Parameters:
aPropXmlInfo - information about the property to read
aElement - DOM element to read from
aParser - parser to use to construct complex values
aOptions - option settings
Throws:
InvalidXMLException

readUnknownPropertyValueFromXMLElement

protected void readUnknownPropertyValueFromXMLElement(org.w3c.dom.Element aElement,
                                                      XMLParser aParser,
                                                      XMLParser.ParsingOptions aOptions,
                                                      java.util.List<java.lang.String> aKnownPropertyNames)
                                               throws InvalidXMLException
Description copied from class: MetaDataObject_impl
Utility method that attempts to read a property value from an XML element even though it is not known to which property the value should be assigned. If an object can be constructed from the XML element, it will be assigned to any unasigned property that can accept it.

Overrides:
readUnknownPropertyValueFromXMLElement in class MetaDataObject_impl
Parameters:
aElement - DOM element to read from
aParser - parser to use to construct complex values
aKnownPropertyNames - List of propertiees that we've already values for (these values will not be overwritten)
Throws:
InvalidXMLException - if no acceptable object is described by aElement

isAsynchronousModeSupported

public boolean isAsynchronousModeSupported()
Description copied from interface: AnalysisEngineMetaData
Determines if this AnalysisEngine supports asynchronous communication. Not yet implemented; reserved for furture use.

Specified by:
isAsynchronousModeSupported in interface AnalysisEngineMetaData
Returns:
true if and only if this AnalysisEngine supports asynchronous communication
See Also:
AnalysisEngineMetaData.isAsynchronousModeSupported()

setAsynchronousModeSupported

public void setAsynchronousModeSupported(boolean aSupported)
Description copied from interface: AnalysisEngineMetaData
Sets whether this AnalysisEngine supports asynchronous communication. If this is set to true then the AnalysisEngine should implement the AsynchronousAnalysisEngine interface (not yet impleneted).

Specified by:
setAsynchronousModeSupported in interface AnalysisEngineMetaData
Parameters:
aSupported - true if and only if this AnalysisEngine supports asynchronous communication
See Also:
AnalysisEngineMetaData.setAsynchronousModeSupported(boolean)

getFlowConstraints

public FlowConstraints getFlowConstraints()
Description copied from interface: AnalysisEngineMetaData
For an aggregate AnalysisEngine only, gets the constraints on the execution sequence of the delegate AnalysisEngines within the aggregate. Flow constraints are optional. If provided they may be used by the FlowController, the component which ultimately determines the flow.

The returned FlowConstraints object refers to the delgate AnalysisEngines using String keys. These are the keys used to refer to the delegate AnalysisEngines in the AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers() map.

Specified by:
getFlowConstraints in interface AnalysisEngineMetaData
Returns:
the flow constraints for the AnalysisEngine, or null if no flow constraints are published by this AnalysisEngine.
See Also:
AnalysisEngineMetaData.getFlowConstraints()

setFlowConstraints

public void setFlowConstraints(FlowConstraints aFlowConstraints)
Description copied from interface: AnalysisEngineMetaData
For an aggregate AnalysisEngine only, sets the constraints on the execution sequence of the delegate AnalysisEngines within the aggregate.Flow constraints are optional. If provided they may be used by the FlowController, the component which ultimately determines the flow.

The returned FlowConstraints object refers to the delgate AnalysisEngines using String keys. These are the keys used to refer to the delegate AnalysisEngines in the AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers() map.

Specified by:
setFlowConstraints in interface AnalysisEngineMetaData
Parameters:
aFlowConstraints - the flow constraints for the AnalysisEngine, or null if there are no flow constraints
See Also:
AnalysisEngineMetaData.setFlowConstraints(FlowConstraints)

getDelegateAnalysisEngineMetaData

public AnalysisEngineMetaData[] getDelegateAnalysisEngineMetaData()
Description copied from interface: AnalysisEngineMetaData
For an aggregate AnalysisEngine only, gets the metadata of the delegate AnalysisEngines.

Publishing this information is optional; some implementations may always return null here.

Specified by:
getDelegateAnalysisEngineMetaData in interface AnalysisEngineMetaData
Returns:
an array of delegate AnalysisEngine metadata, or null if that information is not available.
See Also:
AnalysisEngineMetaData.getDelegateAnalysisEngineMetaData()

_setDelegateAnalysisEngineMetaData

public void _setDelegateAnalysisEngineMetaData(AnalysisEngineMetaData[] aMetaData)
Used internally to set the AnalysisEngine metadata. Not published through the interface or available to the JavaBeans introspector.

Parameters:
aMetaData - metadata for the delegate AnalysisEngines

isSofaAware

public boolean isSofaAware()
Gets whether this AE is sofa-aware. This is a derived property that cannot be set directly. An AE is sofa-aware if and only if it declares at least one input sofa or output sofa.

Specified by:
isSofaAware in interface ProcessingResourceMetaData
Returns:
true if this component is sofa-aware, false if it is sofa-unaware.

getXmlizationInfo

protected XmlizationInfo getXmlizationInfo()
Description copied from class: MetaDataObject_impl
To be implemented by subclasses to return information describing how to represent this object in XML.

Overrides:
getXmlizationInfo in class ResourceMetaData_impl
Returns:
information defining this object's XML representation

getXmlizationInfoForClass

protected static XmlizationInfo getXmlizationInfoForClass()
Static method to get XmlizationInfo, used by subclasses to set up their own XmlizationInfo.



Copyright © 2010 The Apache Software Foundation. All Rights Reserved.