public class UimacppAnalysisEngineImpl extends AnalysisEngineImplBase implements AnalysisEngine
AnalysisEngine.LOG_RESOURCE_BUNDLE, PARAM_VERIFICATION_MODEMDC_ANNOTATOR_CONTEXT_NAME, MDC_ANNOTATOR_IMPL_NAME, MDC_CAS_ID, MDC_ROOT_CONTEXT_ID, PARAM_CONFIG_PARAM_SETTINGS, PARAM_MBEAN_NAME_PREFIX, PARAM_MBEAN_SERVER, PARAM_NUM_SIMULTANEOUS_REQUESTS, PARAM_RESOURCE_MANAGER, PARAM_THROTTLE_EXCESSIVE_ANNOTATOR_LOGGING, PARAM_TIMEOUT_PERIODPARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_UIMA_CONTEXT| Constructor and Description |
|---|
UimacppAnalysisEngineImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected AnalysisComponent |
_getAnnotator()
For a primitive AnalysisEngine only, gets the Annotator.
|
protected AnnotatorContext_impl |
_getAnnotatorContext()
For a primitive AnalysisEngine only, gets the AnnotatorContext.
|
protected Map<String,ResourceSpecifier> |
_getComponentCasProcessorSpecifierMap()
For an aggregate AnalysisEngine only, gets a Map from each component's key to the specifier for
that component.
|
void |
batchProcessComplete()
Notifies this AnalysisEngine that processing of a batch has completed.
|
protected CAS |
callAnalysisComponentNext()
Calls the Analysis Component's next() method.
|
protected void |
callAnalysisComponentProcess(CAS aCAS)
Calls the Analysis Component's process method.
|
void |
collectionProcessComplete()
Notifies this AnalysisEngine that processing of an entire collection has completed.
|
protected AnalysisProcessData_impl |
createAnalysisProcessData()
Deprecated.
|
void |
destroy()
Releases all resources held by this
Resource. |
protected void |
enableProhibitedAnnotatorCasFunctions(CAS aCAS,
boolean aEnable)
Lock/unlock CAS functions to which Annotators should not have access
|
boolean |
initialize(ResourceSpecifier aSpecifier,
Map<String,Object> aAdditionalParams)
Initializes this
Resource from a ResourceSpecifier. |
protected void |
initializeAnalysisComponent()
A utility method that performs initialization logic for a primitive AnalysisEngine.
|
protected void |
mergeDelegateAnalysisEngineMetaData()
For an aggregate TAF AE, sets this aggregate AE's Type System, Type Priorities, and FS Index
Descriptions equal to the result of merging the information from its delegate AEs.
|
CasIterator |
processAndOutputNewCASes(CAS aCAS)
Processes a CAS, possibly producing multiple CASes as a result.
|
void |
reconfigure()
Instructs this Resource to re-read its configuration parameter settings.
|
void |
setResultSpecification(ResultSpecification aResultSpec)
Sets the list of output types and features that the application wants this AnalysisEngine to
produce.
|
batchProcessComplete, buildProcessTraceFromMBeanStats, buildProcessTraceFromMBeanStats, callInitializeMethod, callProcessMethod, collectionProcessComplete, createResultSpecification, createResultSpecification, enterBatchProcessComplete, enterCollectionProcessComplete, enterProcess, exitBatchProcessComplete, exitCollectionProcessComplete, exitProcess, finalize, getAnalysisEngineMetaData, getCurrentConfigParameterSettings, getFeatureNamesForType, getManagementInterface, getMBean, getMBeanNamePrefix, getMBeanServer, getPerformanceTuningSettings, getProcessingResourceMetaData, isProcessTraceEnabled, isReadOnly, isStateless, newCAS, newJCas, normalizeIsoLangCodes, process, process, process, process, process, process, process, processAndOutputNewCASes, processCas, processCas, resetResultSpecificationToDefault, setMetaData, setPerformanceTuningSettings, typeSystemInitgetConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValuegetCasManager, getLogger, getMetaData, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, loadUserClass, loadUserClassOrThrow, setContextHolder, setContextHolderX, setLogger, withContextHolderclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateResultSpecification, createResultSpecification, getAnalysisEngineMetaData, getFeatureNamesForType, getLogger, getManagementInterface, getPerformanceTuningSettings, getResourceManager, newCAS, newJCas, process, process, process, process, process, process, process, processAndOutputNewCASes, setLoggergetConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValuegetMetaData, getUimaContext, getUimaContextAdminprocessCas, processCas, typeSystemInitbatchProcessComplete, collectionProcessComplete, getProcessingResourceMetaData, isReadOnly, isStatelesspublic boolean initialize(ResourceSpecifier aSpecifier, Map<String,Object> aAdditionalParams) throws ResourceInitializationException
ResourceResource from a ResourceSpecifier. Applications
do not need to call this method. It is called automatically by the ResourceFactory
and cannot be called a second time.initialize in interface AnalysisEngineinitialize in interface Resourceinitialize in class AnalysisEngineImplBaseaSpecifier - specifies how to create a resource or locate an existing resource service.aAdditionalParams - a Map containing additional parameters. May be null if there are no
parameters. Each class that implements this interface can decide what additional
parameters it supports.ResourceSpecifier is not of an appropriate type for this Resource. If
the ResourceSpecifier is of an appropriate type but is invalid or if
some other failure occurs, an exception should be thrown.ResourceInitializationException - or
wraps invalid xml exception when processing importsResource.initialize(ResourceSpecifier, Map)public void setResultSpecification(ResultSpecification aResultSpec)
AnalysisEnginesetResultSpecification in interface AnalysisEnginesetResultSpecification in class AnalysisEngineImplBaseaResultSpec - specifies the list of output types and features that the application is interested in.public void destroy()
ResourceResource.destroy in interface Resourcedestroy in class Resource_ImplBaseResource.destroy()public CasIterator processAndOutputNewCASes(CAS aCAS) throws AnalysisEngineProcessException
AnalysisEngineCasIterator interface to step through the output CASes.
If this Analysis Engine does not produce output CASes, then the CasIterator will
return no elements. You can check if an AnalysisEngine is capable of producing output CASes by
checking the
OperationalProperties.getOutputsNewCASes()
operational property (getAnalysisEngineMetaData().getOperationalProperties().getOutputsNewCASes()).
Once this method is called, the AnalysisEngine "owns" aCAS until such time as
the CasIterator.hasNext() method returns false. That is, the caller should not attempt
to modify or access the input CAS until it has read all of the elements from the CasIterator.
If the caller wants to abort the processing before having read all of the output CASes, it may
call CasIterator.release(), which will stop further processing from occurring, and
ownership of aCAS will revert to the caller.
processAndOutputNewCASes in interface AnalysisEngineprocessAndOutputNewCASes in class AnalysisEngineImplBaseaCAS - the CAS to be processedAnalysisEngineProcessException - if a failure occurs during processingpublic void batchProcessComplete()
throws AnalysisEngineProcessException
AnalysisEnginebatchProcessComplete in interface AnalysisEnginebatchProcessComplete in class AnalysisEngineImplBaseAnalysisEngineProcessException - if an exception occurs during processingpublic void collectionProcessComplete()
throws AnalysisEngineProcessException
AnalysisEngine
If this AnalysisEngine is an aggregate, this method will call the collectionProcessComplete method of
all components of that aggregate. If the aggregate descriptor declares a fixedFlow or
capabilityLanguageFlow, then the components' collectionProcessComplete methods will be called
in the order specified by that flow element. Once all components in the flow have been called, any components
not declared in the flow will be called, in arbitrary order. If there is no fixedFlow or
capabilityLanguageFlow, then all components in the aggregate will be called in arbitrary order.
collectionProcessComplete in interface AnalysisEnginecollectionProcessComplete in class AnalysisEngineImplBaseAnalysisEngineProcessException - if an exception occurs during processingpublic void reconfigure()
throws ResourceConfigurationException
ConfigurableResourcereconfigure in interface AnalysisEnginereconfigure in interface ConfigurableResourcereconfigure in class ConfigurableResource_ImplBaseResourceConfigurationException - if the configuration is not validAnalysisEngine.reconfigure()protected void callAnalysisComponentProcess(CAS aCAS) throws AnalysisEngineProcessException
aCAS - CAS to be processed by annotatorAnalysisEngineProcessException - -protected void initializeAnalysisComponent()
throws ResourceInitializationException
ResourceInitializationException - if an initialization failure occursprotected void mergeDelegateAnalysisEngineMetaData()
throws ResourceInitializationException
ResourceInitializationException - if an error occursprotected void enableProhibitedAnnotatorCasFunctions(CAS aCAS, boolean aEnable)
aCAS - the CAS to be affectedaEnable - false to lock out functions, true to re-enable themprotected CAS callAnalysisComponentNext() throws AnalysisEngineProcessException, ResultNotSupportedException
AnalysisEngineProcessException - -ResultNotSupportedException - -@Deprecated protected AnalysisProcessData_impl createAnalysisProcessData()
protected AnalysisComponent _getAnnotator()
protected AnnotatorContext_impl _getAnnotatorContext()
protected Map<String,ResourceSpecifier> _getComponentCasProcessorSpecifierMap()
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.