|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.collection.impl.cpm.BaseCPMImpl
org.apache.uima.collection.impl.cpm.CPMImpl
public class CPMImpl
Field Summary |
---|
Fields inherited from class org.apache.uima.collection.impl.cpm.BaseCPMImpl |
---|
cpmThreadGroup |
Fields inherited from interface org.apache.uima.collection.base_cpm.BaseCPM |
---|
DOCUMENT_TEXT_FEATURE, DOCUMENT_TEXT_TYPE |
Constructor Summary | |
---|---|
CPMImpl()
|
|
CPMImpl(ResourceManager aResourceManager)
|
Method Summary | |
---|---|
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 CasConsumers s 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. |
Methods inherited from class org.apache.uima.collection.impl.cpm.BaseCPMImpl |
---|
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, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.uima.collection.CollectionProcessingManager |
---|
getPerformanceReport, getProgress, isPaused, isPauseOnException, isProcessing, isSerialProcessingRequired, pause, resume, resume, setPauseOnException, setSerialProcessingRequired, stop |
Constructor Detail |
---|
public CPMImpl() throws java.lang.Exception
java.lang.Exception
public CPMImpl(ResourceManager aResourceManager) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public AnalysisEngine getAnalysisEngine()
CollectionProcessingManager
AnalysisEngine
that is assigned to this CPM.
getAnalysisEngine
in interface CollectionProcessingManager
AnalysisEngine
that this CPM will use to analyze each CAS in the
collection.public void setAnalysisEngine(AnalysisEngine aAnalysisEngine) throws ResourceConfigurationException
CollectionProcessingManager
AnalysisEngine
that is assigned to this CPM.
setAnalysisEngine
in interface CollectionProcessingManager
aAnalysisEngine
- the AnalysisEngine
that this CPM will use to analyze each CAS in the
collection.
ResourceConfigurationException
public CasConsumer[] getCasConsumers()
CollectionProcessingManager
CasConsumers
s assigned to this CPM.
getCasConsumers
in interface CollectionProcessingManager
CasConsumer
spublic void addCasConsumer(CasConsumer aCasConsumer) throws ResourceConfigurationException
CollectionProcessingManager
CasConsumer
to this CPM.
addCasConsumer
in interface CollectionProcessingManager
aCasConsumer
- a CasConsumer
to add
ResourceConfigurationException
public void removeCasConsumer(CasConsumer aCasConsumer)
CollectionProcessingManager
CasConsumer
from this CPM.
removeCasConsumer
in interface CollectionProcessingManager
aCasConsumer
- the CasConsumer
to removepublic void addStatusCallbackListener(StatusCallbackListener aListener)
CollectionProcessingManager
addStatusCallbackListener
in interface CollectionProcessingManager
aListener
- the listener to addpublic void removeStatusCallbackListener(StatusCallbackListener aListener)
CollectionProcessingManager
removeStatusCallbackListener
in interface CollectionProcessingManager
aListener
- the listener to removepublic void process(CollectionReader aCollectionReader) throws ResourceInitializationException
CollectionProcessingManager
CollectionProcessingManager.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 CollectionProcessingManager
aCollectionReader
- the CollectionReader
from which to obtain the Entities to be processed
ResourceInitializationException
- if an error occurs during initializationpublic void process(CollectionReader aCollectionReader, int aBatchSize) throws ResourceInitializationException
CollectionProcessingManager
CollectionProcessingManager.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 CollectionProcessingManager
aCollectionReader
- the CollectionReader
from which to obtain the Entities to be processedaBatchSize
- the size of the batch.
ResourceInitializationException
- if an error occurs during initialization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |