Package org.apache.uima.fit.cpe
Class CpeBuilder
java.lang.Object
org.apache.uima.fit.cpe.CpeBuilder
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
-
Method Summary
Modifier and TypeMethodDescriptioncreateCpe
(StatusCallbackListener aListener) void
Set the analysis engine used by the CPE.void
setMaxProcessingUnitThreadCount
(int aMaxProcessingUnitThreadCount) Set the maximum number of threads the CPE may use.void
Set the reader used by the CPE.
-
Constructor Details
-
CpeBuilder
public CpeBuilder()
-
-
Method Details
-
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(CollectionReaderDescription aDesc) throws IOException, SAXException, 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.CpeDescriptorException
- if there was a problem adding the reader to the CPE.
-
setAnalysisEngine
public void setAnalysisEngine(AnalysisEngineDescription aDesc) throws IOException, SAXException, CpeDescriptorException, 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.CpeDescriptorException
- if there was a problem adding the analysis engine to the CPE.InvalidXMLException
- if import resolution failed
-
getCpeDescription
-
createCpe
public CollectionProcessingEngine createCpe(StatusCallbackListener aListener) throws ResourceInitializationException, CpeDescriptorException
-