org.apache.uima.collection.base_cpm
Interface CasDataConsumer
- All Superinterfaces:
- CasDataProcessor, CasProcessor, ConfigurableResource, Resource
- All Known Implementing Classes:
- CasDataConsumer_ImplBase
public interface CasDataConsumer
- extends ConfigurableResource, CasDataProcessor
Any component that operates on analysis results produced by a UIMA CasDataProcessor.
CASDataConsumers may be registered with a
CollectionProcessingManager
(CPM). During collection
processing, the CPM will pass each CasData from CasProcessor to each consumer's process method.
The CAS consumer can do anything it wants with the CASes it receives; commonly CAS consumers will
build aggregate data structures such as search engine indices or glossaries.
The CPM will also call each CAS Consumer's batchProcessComplete(ProcessTrace)
method at
the end of each batch and their collectionProcessComplete(ProcessTrace)
method called at
the end of the collection.
CasConsumer
s are also ConfigurableResource
s, and can be instantiated
from descriptors. See
XMLParser.parseCasConsumerDescription(XMLInputSource)
and
UIMAFramework.produceCasConsumer(ResourceSpecifier,Map)
for more
information.
batchProcessComplete
void batchProcessComplete(ProcessTrace aTrace)
throws ResourceProcessException,
IOException
- Completes the processing of a batch. A collection may be divided into one or more batches - it
is up to the CollectionProcessingManager or the application to determine the number and size of
batches.
- Specified by:
batchProcessComplete
in interface CasProcessor
- Parameters:
aTrace
- an object that records information, such as timing, about this method's execution.
- Throws:
ResourceProcessException
- if an exception occurs during processing
IOException
- if an I/O failure occurs
collectionProcessComplete
void collectionProcessComplete(ProcessTrace aTrace)
throws ResourceProcessException,
IOException
- Completes the processing of an entire collection.
- Specified by:
collectionProcessComplete
in interface CasProcessor
- Parameters:
aTrace
- an object that records information, such as timing, about this method's execution.
- Throws:
ResourceProcessException
- if an exception occurs during processing
IOException
- if an I/O failure occurs
Copyright © 2010 The Apache Software Foundation. All Rights Reserved.