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 indexes 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.

- - ### Field Summary

    - ### Fields inherited from interface org.apache.uima.resource.Resource

      `PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `batchProcessComplete(ProcessTrace aTrace)` Completes the processing of a batch.
    `void` | `collectionProcessComplete(ProcessTrace aTrace)` Completes the processing of an entire collection.

    - ### Methods inherited from interface org.apache.uima.resource.ConfigurableResource

      `getConfigParameterValue, getConfigParameterValue, reconfigure, setConfigParameterValue, setConfigParameterValue`

    - ### Methods inherited from interface org.apache.uima.resource.Resource

      `destroy, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger`

    - ### Methods inherited from interface org.apache.uima.collection.base_cpm.CasDataProcessor

      `process, process`

    - ### Methods inherited from interface org.apache.uima.collection.base_cpm.CasProcessor

      `getProcessingResourceMetaData, isReadOnly, isStateless`

- - ### Method Detail

    - #### 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 © 2006–2018 The Apache Software Foundation. All rights reserved.