public class CPMImpl extends BaseCPMImpl implements CollectionProcessingManager
cpmThreadGroupDOCUMENT_TEXT_FEATURE, DOCUMENT_TEXT_TYPE| Constructor and Description |
|---|
CPMImpl() |
CPMImpl(ResourceManager aResourceManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCasConsumer(CasConsumer aCasConsumer)
Adds a
CasConsumer to this CPM. |
void |
addStatusCallbackListener(StatusCallbackListener aListener)
Registers a listsner to receive status callbacks.
|
AnalysisEngine |
getAnalysisEngine()
Gets the
AnalysisEngine that is assigned to this CPM. |
CasConsumer[] |
getCasConsumers()
Gets the
CasConsumerss assigned to this CPM. |
void |
process(CollectionReader aCollectionReader)
Initiates processing of a collection.
|
void |
process(CollectionReader aCollectionReader,
int aBatchSize)
Initiates processing of a collection.
|
void |
removeCasConsumer(CasConsumer aCasConsumer)
Removes a
CasConsumer from this CPM. |
void |
removeStatusCallbackListener(StatusCallbackListener aListener)
Unregisters a status callback listener.
|
void |
setAnalysisEngine(AnalysisEngine aAnalysisEngine)
Sets the
AnalysisEngine that is assigned to this CPM. |
addCasProcessor, addCasProcessor, addStatusCallbackListener, asynchStop, buildEventTree, disableCasProcessor, displayStats, enableCasProcessor, finalizeIt, getCasProcessors, getCollectionReader, getCPEConfig, getDescriptor, getPerformanceReport, getProgress, getSynchPoint, init, isPaused, isPauseOnException, isProcessing, isSerialProcessingRequired, kill, pause, process, process, process, removeCasProcessor, removeStatusCallbackListener, resume, resume, run, setCollectionReader, setJediiReport, setPauseOnException, setPerformanceTuningSettings, setProcessControllerAdapter, setSerialProcessingRequired, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPerformanceReport, getProgress, isPaused, isPauseOnException, isProcessing, isSerialProcessingRequired, pause, resume, resume, setPauseOnException, setSerialProcessingRequired, stoppublic CPMImpl(ResourceManager aResourceManager) throws Exception
Exceptionpublic AnalysisEngine getAnalysisEngine()
CollectionProcessingManagerAnalysisEngine that is assigned to this CPM.getAnalysisEngine in interface CollectionProcessingManagerAnalysisEngine that this CPM will use to analyze each CAS in the
collection.public void setAnalysisEngine(AnalysisEngine aAnalysisEngine) throws ResourceConfigurationException
CollectionProcessingManagerAnalysisEngine that is assigned to this CPM.setAnalysisEngine in interface CollectionProcessingManageraAnalysisEngine - the AnalysisEngine that this CPM will use to analyze each CAS in the
collection.ResourceConfigurationException - if this CPM is currently processingpublic CasConsumer[] getCasConsumers()
CollectionProcessingManagerCasConsumerss assigned to this CPM.getCasConsumers in interface CollectionProcessingManagerCasConsumerspublic void addCasConsumer(CasConsumer aCasConsumer) throws ResourceConfigurationException
CollectionProcessingManagerCasConsumer to this CPM.addCasConsumer in interface CollectionProcessingManageraCasConsumer - a CasConsumer to addResourceConfigurationException - if this CPM is currently processingpublic void removeCasConsumer(CasConsumer aCasConsumer)
CollectionProcessingManagerCasConsumer from this CPM.removeCasConsumer in interface CollectionProcessingManageraCasConsumer - the CasConsumer to removepublic void addStatusCallbackListener(StatusCallbackListener aListener)
CollectionProcessingManageraddStatusCallbackListener in interface CollectionProcessingManageraListener - the listener to addpublic void removeStatusCallbackListener(StatusCallbackListener aListener)
CollectionProcessingManagerremoveStatusCallbackListener in interface CollectionProcessingManageraListener - the listener to removepublic void process(CollectionReader aCollectionReader) throws ResourceInitializationException
CollectionProcessingManagerCollectionProcessingManager.addStatusCallbackListener(StatusCallbackListener) method.
A CPM can only process one collection at a time. If this method is called while a previous
processing request has not yet completed, a UIMA_IllegalStateException will
result. To find out whether a CPM is free to begin another processing request, call the
CollectionProcessingManager.isProcessing() method.
process in interface CollectionProcessingManageraCollectionReader - the CollectionReader from which to obtain the Entities to be processedResourceInitializationException - if an error occurs during initializationpublic void process(CollectionReader aCollectionReader, int aBatchSize) throws ResourceInitializationException
CollectionProcessingManagerCollectionProcessingManager.process(CollectionReader), but it breaks the processing up into batches of a size
determined by the aBatchSize parameter. Each CasConsumer will be
notified at the end of each batch.process in interface CollectionProcessingManageraCollectionReader - the CollectionReader from which to obtain the Entities to be processedaBatchSize - the size of the batch.ResourceInitializationException - if an error occurs during initializationCopyright © 2018. All rights reserved.