org.apache.uima.collection.impl
Class CollectionProcessingEngine_impl

java.lang.Object
  extended by org.apache.uima.collection.impl.CollectionProcessingEngine_impl
All Implemented Interfaces:
CollectionProcessingEngine

public class CollectionProcessingEngine_impl
extends java.lang.Object
implements CollectionProcessingEngine


Constructor Summary
CollectionProcessingEngine_impl()
           
 
Method Summary
 void addStatusCallbackListener(StatusCallbackListener aListener)
          Registers a listsner to receive status callbacks.
 void asynchStop()
           
 CasProcessor[] getCasProcessors()
          Gets the CasProcessorss in this CPE, in the order in which they will be executed.
 BaseCollectionReader getCollectionReader()
          Gets the Collection Reader for this CPE.
protected  BaseCPMImpl getCPM()
           
 ProcessTrace getPerformanceReport()
          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.
 void initialize(CpeDescription aCpeDescription, java.util.Map aAdditionalParams)
          Initializes this CPE from a cpeDescription Applications do not need to call this method.
 boolean isPaused()
          Determines whether this CPE's processing is currently paused.
 boolean isProcessing()
          Determines whether this CPE is currently processing.
 void kill()
          Kill CPM hard.
 void pause()
          Pauses processing.
 void process()
          Initiates processing of a collection.
 void removeStatusCallbackListener(StatusCallbackListener aListener)
          Unregisters a status callback listener.
 void resume()
          Resumes processing that has been paused.
 void stop()
          Stops processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionProcessingEngine_impl

public CollectionProcessingEngine_impl()
Method Detail

initialize

public void initialize(CpeDescription aCpeDescription,
                       java.util.Map aAdditionalParams)
                throws ResourceInitializationException
Description copied from interface: CollectionProcessingEngine
Initializes this CPE from a cpeDescription 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 interface CollectionProcessingEngine
Parameters:
aCpeDescription - CPE description, generally parsed from an XML file
aAdditionalParams - a Map containing additional parameters. May be null 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

public void addStatusCallbackListener(StatusCallbackListener aListener)
Description copied from interface: CollectionProcessingEngine
Registers a listsner to receive status callbacks.

Specified by:
addStatusCallbackListener in interface CollectionProcessingEngine
Parameters:
aListener - the listener to add

removeStatusCallbackListener

public void removeStatusCallbackListener(StatusCallbackListener aListener)
Description copied from interface: CollectionProcessingEngine
Unregisters a status callback listener.

Specified by:
removeStatusCallbackListener in interface CollectionProcessingEngine
Parameters:
aListener - the listener to remove

process

public void process()
             throws ResourceInitializationException
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 the CollectionProcessingEngine.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 the CollectionProcessingEngine.isProcessing() method.

Specified by:
process in interface CollectionProcessingEngine
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 been CollectionProcessingEngine.stop()ped. If processing is paused, this method will still return true.

Specified by:
isProcessing in interface CollectionProcessingEngine
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 the CollectionProcessingEngine.resume() method.

Specified by:
pause in interface CollectionProcessingEngine

isPaused

public boolean isPaused()
Description copied from interface: CollectionProcessingEngine
Determines whether this CPE's processing is currently paused.

Specified by:
isPaused in interface CollectionProcessingEngine
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 interface CollectionProcessingEngine

stop

public void stop()
Description copied from interface: CollectionProcessingEngine
Stops processing.

Specified by:
stop in interface CollectionProcessingEngine

kill

public void kill()
Description copied from interface: CollectionProcessingEngine
Kill CPM hard.

Specified by:
kill in interface CollectionProcessingEngine

asynchStop

public void asynchStop()

getPerformanceReport

public ProcessTrace 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 interface CollectionProcessingEngine
Returns:
an object containing performance statistics

getProgress

public Progress[] 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 interface CollectionProcessingEngine
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

protected BaseCPMImpl getCPM()

getCasProcessors

public CasProcessor[] getCasProcessors()
Description copied from interface: CollectionProcessingEngine
Gets the CasProcessorss in this CPE, in the order in which they will be executed.

Specified by:
getCasProcessors in interface CollectionProcessingEngine
Returns:
an array of CasProcessors

getCollectionReader

public BaseCollectionReader getCollectionReader()
Description copied from interface: CollectionProcessingEngine
Gets the Collection Reader for this CPE.

Specified by:
getCollectionReader in interface CollectionProcessingEngine
Returns:
the collection reader


Copyright © 2013. All Rights Reserved.