Class CasProcessorAnnotator
- java.lang.Object
-
- org.apache.uima.resource.Resource_ImplBase
-
- org.apache.uima.resource.ConfigurableResource_ImplBase
-
- org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase
-
- org.apache.uima.analysis_engine.impl.AnalysisEngineProcessorAdapter
-
- org.apache.uima.analysis_component.CasProcessorAnnotator
-
- All Implemented Interfaces:
AnalysisEngine
,TextAnalysisEngine
,CasObjectProcessor
,CasProcessor
,CasConsumer
,ConfigurableResource
,Resource
public class CasProcessorAnnotator extends AnalysisEngineProcessorAdapter
-
-
Field Summary
Fields Modifier and Type Field Description private CasProcessor<? extends java.lang.Exception>
delegate
private ResourceMetaData
metaData
-
Fields inherited from class org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase
LOG_RESOURCE_BUNDLE, PARAM_VERIFICATION_MODE
-
Fields inherited from interface org.apache.uima.analysis_engine.AnalysisEngine
MDC_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_PERIOD
-
Fields inherited from interface org.apache.uima.resource.Resource
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
-
-
Constructor Summary
Constructors Constructor Description CasProcessorAnnotator(CasProcessor<? extends java.lang.Exception> aCasAnnotator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
initialize(ResourceSpecifier aSpecifier, java.util.Map<java.lang.String,java.lang.Object> aAdditionalParams)
Initializes thisResource
from aResourceSpecifier
.private AnalysisEngineProcessorStub
makeDelegate()
static CasProcessorAnnotator
of(CasProcessor<? extends java.lang.Exception> aCasAnnotator)
-
Methods inherited from class org.apache.uima.analysis_engine.impl.AnalysisEngineProcessorAdapter
batchProcessComplete, collectionProcessComplete, destroy, getConfigParameterValue, getConfigParameterValue, getMetaData, getResourceName, getStub, processAndOutputNewCASes, reconfigure, setConfigParameterValue, setConfigParameterValue, setStub
-
Methods inherited from class org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase
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, setResultSpecification, typeSystemInit
-
Methods inherited from class org.apache.uima.resource.Resource_ImplBase
getCasManager, getLogger, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, loadUserClass, loadUserClassOrThrow, setContextHolder, setContextHolderX, setLogger, withContextHolder
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.uima.analysis_engine.AnalysisEngine
createResultSpecification, createResultSpecification, getAnalysisEngineMetaData, getFeatureNamesForType, getLogger, getManagementInterface, getPerformanceTuningSettings, getResourceManager, newCAS, newJCas, process, process, process, process, process, process, process, processAndOutputNewCASes, setLogger, setResultSpecification
-
Methods inherited from interface org.apache.uima.collection.CasConsumer
isReadOnly
-
Methods inherited from interface org.apache.uima.collection.base_cpm.CasObjectProcessor
processCas, processCas, typeSystemInit
-
Methods inherited from interface org.apache.uima.collection.base_cpm.CasProcessor
batchProcessComplete, collectionProcessComplete, getProcessingResourceMetaData, isStateless
-
Methods inherited from interface org.apache.uima.resource.Resource
getUimaContext, getUimaContextAdmin
-
-
-
-
Field Detail
-
metaData
private ResourceMetaData metaData
-
delegate
private CasProcessor<? extends java.lang.Exception> delegate
-
-
Constructor Detail
-
CasProcessorAnnotator
public CasProcessorAnnotator(CasProcessor<? extends java.lang.Exception> aCasAnnotator)
-
-
Method Detail
-
initialize
public boolean initialize(ResourceSpecifier aSpecifier, java.util.Map<java.lang.String,java.lang.Object> aAdditionalParams) throws ResourceInitializationException
Description copied from interface:Resource
Initializes thisResource
from aResourceSpecifier
. Applications do not need to call this method. It is called automatically by theResourceFactory
and cannot be called a second time.- Specified by:
initialize
in interfaceAnalysisEngine
- Specified by:
initialize
in interfaceResource
- Overrides:
initialize
in classAnalysisEngineImplBase
- Parameters:
aSpecifier
- specifies how to create a resource or locate an existing resource service.aAdditionalParams
- a Map containing additional parameters. May benull
if there are no parameters. Each class that implements this interface can decide what additional parameters it supports.- Returns:
- true if and only if initialization completed successfully. Returns false if the given
ResourceSpecifier
is not of an appropriate type for this Resource. If theResourceSpecifier
is of an appropriate type but is invalid or if some other failure occurs, an exception should be thrown. - Throws:
ResourceInitializationException
- if a failure occurs during initialization.- See Also:
multi-thread safe, given that each instance of this class is only called on one thread, once. The critical parts that update shared information (in shared uima context) are inside a synchronize block
-
makeDelegate
private AnalysisEngineProcessorStub makeDelegate()
-
of
public static CasProcessorAnnotator of(CasProcessor<? extends java.lang.Exception> aCasAnnotator) throws ResourceInitializationException
- Throws:
ResourceInitializationException
-
-