Package org.apache.uima.collection.impl
Class CollectionProcessingEngine_impl
- java.lang.Object
-
- org.apache.uima.collection.impl.CollectionProcessingEngine_impl
-
- All Implemented Interfaces:
CollectionProcessingEngine
public class CollectionProcessingEngine_impl extends java.lang.Object implements CollectionProcessingEngine
-
-
Field Summary
Fields Modifier and Type Field Description private BaseCPMImplmCPMCPM instance that handles the processing
-
Constructor Summary
Constructors Constructor Description CollectionProcessingEngine_impl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStatusCallbackListener(StatusCallbackListener aListener)Registers a listener to receive status callbacks.voidasynchStop()CasProcessor[]getCasProcessors()Gets theCasProcessorss in this CPE, in the order in which they will be executed.BaseCollectionReadergetCollectionReader()Gets the Collection Reader for this CPE.protected BaseCPMImplgetCPM()ProcessTracegetPerformanceReport()Gets a performance report for the processing that is currently occurring or has just completed.Progress[]getProgress()Gets a progress report for the processing that is currently occurring or has just completed.voidinitialize(CpeDescription aCpeDescription, java.util.Map aAdditionalParams)Initializes this CPE from acpeDescriptionApplications do not need to call this method.booleanisPaused()Determines whether this CPE's processing is currently paused.booleanisProcessing()Determines whether this CPE is currently processing.voidkill()Kill CPM hard.voidpause()Pauses processing.voidprocess()Initiates processing of a collection.voidremoveStatusCallbackListener(StatusCallbackListener aListener)Unregisters a status callback listener.voidresume()Resumes processing that has been paused.voidstop()Stops processing.
-
-
-
Field Detail
-
mCPM
private BaseCPMImpl mCPM
CPM instance that handles the processing
-
-
Method Detail
-
initialize
public void initialize(CpeDescription aCpeDescription, java.util.Map aAdditionalParams) throws ResourceInitializationException
Description copied from interface:CollectionProcessingEngineInitializes this CPE from acpeDescriptionApplications do not need to call this method. It is called automatically by the framework and cannot be called a second time.- Specified by:
initializein interfaceCollectionProcessingEngine- Parameters:
aCpeDescription- CPE description, generally parsed from an XML fileaAdditionalParams- a Map containing additional parameters. May benullif there are no parameters. Each class that implements this interface can decide what additional parameters it supports.- Throws:
ResourceInitializationException- if a failure occurs during initialization.
-
addStatusCallbackListener
public void addStatusCallbackListener(StatusCallbackListener aListener)
Description copied from interface:CollectionProcessingEngineRegisters a listener to receive status callbacks.- Specified by:
addStatusCallbackListenerin interfaceCollectionProcessingEngine- Parameters:
aListener- the listener to add
-
removeStatusCallbackListener
public void removeStatusCallbackListener(StatusCallbackListener aListener)
Description copied from interface:CollectionProcessingEngineUnregisters a status callback listener.- Specified by:
removeStatusCallbackListenerin interfaceCollectionProcessingEngine- Parameters:
aListener- the listener to remove
-
process
public void process() throws ResourceInitializationExceptionDescription copied from interface:CollectionProcessingEngineInitiates processing of a collection. This method starts the processing in another thread and returns immediately. Status of the processing can be obtained by registering a listener with theCollectionProcessingEngine.addStatusCallbackListener(StatusCallbackListener)method.A CPE can only process one collection at a time. If this method is called while a previous processing request has not yet completed, a
UIMA_IllegalStateExceptionwill result. To find out whether a CPE is free to begin another processing request, call theCollectionProcessingEngine.isProcessing()method.- Specified by:
processin interfaceCollectionProcessingEngine- Throws:
ResourceInitializationException- if an error occurs during initialization
-
isProcessing
public boolean isProcessing()
Description copied from interface:CollectionProcessingEngineDetermines whether this CPE is currently processing. This means that a processing request has been submitted and has not yet completed or beenCollectionProcessingEngine.stop()ped. If processing is paused, this method will still returntrue.- Specified by:
isProcessingin interfaceCollectionProcessingEngine- Returns:
- true if and only if this CPE is currently processing.
-
pause
public void pause()
Description copied from interface:CollectionProcessingEnginePauses processing. Processing can later be resumed by calling theCollectionProcessingEngine.resume()method.- Specified by:
pausein interfaceCollectionProcessingEngine
-
isPaused
public boolean isPaused()
Description copied from interface:CollectionProcessingEngineDetermines whether this CPE's processing is currently paused.- Specified by:
isPausedin interfaceCollectionProcessingEngine- Returns:
- true if and only if this CPE's processing is currently paused.
-
resume
public void resume()
Description copied from interface:CollectionProcessingEngineResumes processing that has been paused.- Specified by:
resumein interfaceCollectionProcessingEngine
-
stop
public void stop()
Description copied from interface:CollectionProcessingEngineStops processing.- Specified by:
stopin interfaceCollectionProcessingEngine
-
kill
public void kill()
Description copied from interface:CollectionProcessingEngineKill CPM hard.- Specified by:
killin interfaceCollectionProcessingEngine
-
asynchStop
public void asynchStop()
-
getPerformanceReport
public ProcessTrace getPerformanceReport()
Description copied from interface:CollectionProcessingEngineGets a performance report for the processing that is currently occurring or has just completed.- Specified by:
getPerformanceReportin interfaceCollectionProcessingEngine- Returns:
- an object containing performance statistics
-
getProgress
public Progress[] getProgress()
Description copied from interface:CollectionProcessingEngineGets a progress report for the processing that is currently occurring or has just completed.- Specified by:
getProgressin interfaceCollectionProcessingEngine- Returns:
- an array of
Progressobjects, each of which represents the progress in a different set of units (for example number of entities or bytes)
-
getCPM
protected BaseCPMImpl getCPM()
-
getCasProcessors
public CasProcessor[] getCasProcessors()
Description copied from interface:CollectionProcessingEngineGets theCasProcessorss in this CPE, in the order in which they will be executed.- Specified by:
getCasProcessorsin interfaceCollectionProcessingEngine- Returns:
- an array of
CasProcessors
-
getCollectionReader
public BaseCollectionReader getCollectionReader()
Description copied from interface:CollectionProcessingEngineGets the Collection Reader for this CPE.- Specified by:
getCollectionReaderin interfaceCollectionProcessingEngine- Returns:
- the collection reader
-
-