public class CpeBuilder extends Object
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 and Description |
---|
CpeBuilder() |
Modifier and Type | Method and Description |
---|---|
CollectionProcessingEngine |
createCpe(StatusCallbackListener aListener) |
CpeDescription |
getCpeDescription() |
void |
setAnalysisEngine(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(CollectionReaderDescription aDesc)
Set the reader used by the CPE.
|
public void setMaxProcessingUnitThreadCount(int aMaxProcessingUnitThreadCount)
aMaxProcessingUnitThreadCount
- the maximum number of threads the CPE may use.public void setReader(CollectionReaderDescription aDesc) throws IOException, SAXException, CpeDescriptorException
aDesc
- the reader description.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.public void setAnalysisEngine(AnalysisEngineDescription aDesc) throws IOException, SAXException, CpeDescriptorException, InvalidXMLException
aDesc
- the analysis engine description.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 failedpublic CpeDescription getCpeDescription()
public CollectionProcessingEngine createCpe(StatusCallbackListener aListener) throws ResourceInitializationException, CpeDescriptorException
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.