Package org.apache.uima.collection.impl
Class CollectionProcessingEngine_impl
java.lang.Object
org.apache.uima.collection.impl.CollectionProcessingEngine_impl
- All Implemented Interfaces:
CollectionProcessingEngine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatusCallbackListener(StatusCallbackListener aListener) Registers a listener to receive status callbacks.voidGets theCasProcessorss in this CPE, in the order in which they will be executed.Gets the Collection Reader for this CPE.protected BaseCPMImplgetCPM()Gets a performance report for the processing that is currently occurring or has just completed.Progress[]Gets a progress report for the processing that is currently occurring or has just completed.voidinitialize(CpeDescription aCpeDescription, Map aAdditionalParams) Initializes this CPE from acpeDescriptionApplications do not need to call this method.booleanisPaused()Determines whether this CPE's processing is currently paused.booleanDetermines whether this CPE is currently processing.voidkill()Kill CPM hard.voidpause()Pauses processing.voidprocess()Initiates processing of a collection.voidUnregisters a status callback listener.voidresume()Resumes processing that has been paused.voidstop()Stops processing.
-
Constructor Details
-
CollectionProcessingEngine_impl
public CollectionProcessingEngine_impl()
-
-
Method Details
-
initialize
public void initialize(CpeDescription aCpeDescription, 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
Description copied from interface:CollectionProcessingEngineRegisters a listener to receive status callbacks.- Specified by:
addStatusCallbackListenerin interfaceCollectionProcessingEngine- Parameters:
aListener- the listener to add
-
removeStatusCallbackListener
Description copied from interface:CollectionProcessingEngineUnregisters a status callback listener.- Specified by:
removeStatusCallbackListenerin interfaceCollectionProcessingEngine- Parameters:
aListener- the listener to remove
-
process
Description 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
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
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
-
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
Description copied from interface:CollectionProcessingEngineGets the Collection Reader for this CPE.- Specified by:
getCollectionReaderin interfaceCollectionProcessingEngine- Returns:
- the collection reader
-