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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStatusCallbackListener
(StatusCallbackListener aListener) Registers a listener to receive status callbacks.void
Gets theCasProcessors
s in this CPE, in the order in which they will be executed.Gets the Collection Reader for this CPE.protected BaseCPMImpl
getCPM()
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.void
initialize
(CpeDescription aCpeDescription, Map aAdditionalParams) Initializes this CPE from acpeDescription
Applications do not need to call this method.boolean
isPaused()
Determines whether this CPE's processing is currently paused.boolean
Determines whether this CPE is currently processing.void
kill()
Kill CPM hard.void
pause()
Pauses processing.void
process()
Initiates processing of a collection.void
Unregisters a status callback listener.void
resume()
Resumes processing that has been paused.void
stop()
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:CollectionProcessingEngine
Initializes this CPE from acpeDescription
Applications do not need to call this method. It is called automatically by the framework and cannot be called a second time.- Specified by:
initialize
in interfaceCollectionProcessingEngine
- Parameters:
aCpeDescription
- CPE description, generally parsed from an XML fileaAdditionalParams
- 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.- Throws:
ResourceInitializationException
- if a failure occurs during initialization.
-
addStatusCallbackListener
Description copied from interface:CollectionProcessingEngine
Registers a listener to receive status callbacks.- Specified by:
addStatusCallbackListener
in interfaceCollectionProcessingEngine
- Parameters:
aListener
- the listener to add
-
removeStatusCallbackListener
Description copied from interface:CollectionProcessingEngine
Unregisters a status callback listener.- Specified by:
removeStatusCallbackListener
in interfaceCollectionProcessingEngine
- Parameters:
aListener
- the listener to remove
-
process
Description copied from interface:CollectionProcessingEngine
Initiates 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_IllegalStateException
will result. To find out whether a CPE is free to begin another processing request, call theCollectionProcessingEngine.isProcessing()
method.- Specified by:
process
in interfaceCollectionProcessingEngine
- Throws:
ResourceInitializationException
- if an error occurs during initialization
-
isProcessing
public boolean isProcessing()Description copied from interface:CollectionProcessingEngine
Determines 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:
isProcessing
in interfaceCollectionProcessingEngine
- Returns:
- true if and only if this CPE is currently processing.
-
pause
public void pause()Description copied from interface:CollectionProcessingEngine
Pauses processing. Processing can later be resumed by calling theCollectionProcessingEngine.resume()
method.- Specified by:
pause
in interfaceCollectionProcessingEngine
-
isPaused
public boolean isPaused()Description copied from interface:CollectionProcessingEngine
Determines whether this CPE's processing is currently paused.- Specified by:
isPaused
in interfaceCollectionProcessingEngine
- Returns:
- true if and only if this CPE's processing is currently paused.
-
resume
public void resume()Description copied from interface:CollectionProcessingEngine
Resumes processing that has been paused.- Specified by:
resume
in interfaceCollectionProcessingEngine
-
stop
public void stop()Description copied from interface:CollectionProcessingEngine
Stops processing.- Specified by:
stop
in interfaceCollectionProcessingEngine
-
kill
public void kill()Description copied from interface:CollectionProcessingEngine
Kill CPM hard.- Specified by:
kill
in interfaceCollectionProcessingEngine
-
asynchStop
public void asynchStop() -
getPerformanceReport
Description copied from interface:CollectionProcessingEngine
Gets a performance report for the processing that is currently occurring or has just completed.- Specified by:
getPerformanceReport
in interfaceCollectionProcessingEngine
- Returns:
- an object containing performance statistics
-
getProgress
Description copied from interface:CollectionProcessingEngine
Gets a progress report for the processing that is currently occurring or has just completed.- Specified by:
getProgress
in interfaceCollectionProcessingEngine
- Returns:
- an array of
Progress
objects, 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:CollectionProcessingEngine
Gets theCasProcessors
s in this CPE, in the order in which they will be executed.- Specified by:
getCasProcessors
in interfaceCollectionProcessingEngine
- Returns:
- an array of
CasProcessor
s
-
getCollectionReader
Description copied from interface:CollectionProcessingEngine
Gets the Collection Reader for this CPE.- Specified by:
getCollectionReader
in interfaceCollectionProcessingEngine
- Returns:
- the collection reader
-