org.apache.uima.fit.cpe

## Class CpeBuilder

- java.lang.Object
- - org.apache.uima.fit.cpe.CpeBuilder

-     public class CpeBuilder
      extends Object

  Build a Collection Processing Engine from a `CollectionReaderDescription` and a `AnalysisEngineDescription`. If an aggregate analysis engine description is used, the builder will add each child of the aggregate engine as one processor to the engine. This works only for aggregate analysis engines using a `FixedFlow`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CpeBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.uima.collection.CollectionProcessingEngine` | `createCpe(org.apache.uima.collection.StatusCallbackListener aListener)`
    `org.apache.uima.collection.metadata.CpeDescription` | `getCpeDescription()`
    `void` | `setAnalysisEngine(org.apache.uima.analysis_engine.AnalysisEngineDescription aDesc)` Set the analysis engine used by the CPE.
    `void` | `setMaxProcessingUnitThreadCount(int aMaxProcessingUnitThreadCount)` Set the maximum number of threads the CPE may use.
    `void` | `setReader(org.apache.uima.collection.CollectionReaderDescription aDesc)` Set the reader used by the CPE.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CpeBuilder

          public CpeBuilder()

  - ### Method Detail

    - #### setMaxProcessingUnitThreadCount

          public void setMaxProcessingUnitThreadCount(int aMaxProcessingUnitThreadCount)

      Set the maximum number of threads the CPE may use.
      Parameters:
        `aMaxProcessingUnitThreadCount` - the maximum number of threads the CPE may use.

    - #### setReader

          public void setReader(org.apache.uima.collection.CollectionReaderDescription aDesc)
                         throws IOException,
                                SAXException,
                                org.apache.uima.collection.metadata.CpeDescriptorException

      Set the reader used by the CPE.
      Parameters:
        `aDesc` - the reader description.
      Throws:
        `IOException` - if the descriptor cannot be written to the temporary space from where it is imported by the CPE.
        `SAXException` - if the reader descriptor cannot be serialized to XML.
        `org.apache.uima.collection.metadata.CpeDescriptorException` - if there was a problem adding the reader to the CPE.

    - #### setAnalysisEngine

          public void setAnalysisEngine(org.apache.uima.analysis_engine.AnalysisEngineDescription aDesc)
                                 throws IOException,
                                        SAXException,
                                        org.apache.uima.collection.metadata.CpeDescriptorException,
                                        org.apache.uima.util.InvalidXMLException

      Set the analysis engine used by the CPE. If this is an aggregate analysis engine, it will be disassembled and each delegate becomes one CPE CAS processor.
      Parameters:
        `aDesc` - the analysis engine description.
      Throws:
        `IOException` - if the descriptor cannot be written to the temporary space from where it is imported by the CPE.
        `SAXException` - if the analysis engine descriptor cannot be serialized to XML.
        `org.apache.uima.collection.metadata.CpeDescriptorException` - if there was a problem adding the analysis engine to the CPE.
        `org.apache.uima.util.InvalidXMLException` - if import resolution failed

    - #### getCpeDescription

          public org.apache.uima.collection.metadata.CpeDescription getCpeDescription()

    - #### createCpe

          public org.apache.uima.collection.CollectionProcessingEngine createCpe(org.apache.uima.collection.StatusCallbackListener aListener)
                                                                          throws org.apache.uima.resource.ResourceInitializationException,
                                                                                 org.apache.uima.collection.metadata.CpeDescriptorException

      Throws:
        `org.apache.uima.resource.ResourceInitializationException`
        `org.apache.uima.collection.metadata.CpeDescriptorException`

Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.