Class CpeDescriptorFactory
java.lang.Object
org.apache.uima.collection.impl.metadata.cpe.CpeDescriptorFactory
Factory class for creating CpeDescriptors and their constituent objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CpeIntegratedCasProcessor
produceCasProcessor
(String aName) static CasProcessorDeploymentParams
static CasProcessorErrorHandling
static CasProcessorExecArg
static CasProcessorExecutable
static CasProcessorFilter
produceCasProcessorFilter
(String aFilter) static CasProcessorMaxRestarts
static CpeCasProcessors
static CpeCasProcessors
produceCasProcessors
(int aInputQSize, int aOutputQSize, int aPuCount, CpeDescription aDescriptor) static CpeCasProcessors
produceCasProcessors
(CpeDescription aDescriptor) static CasProcessorTimeout
static CpeCollectionReader
static CpeCollectionReader
produceCollectionReader
(String aCollectionReaderDescriptorPath) static CpeCollectionReader
produceCollectionReader
(String aCollectionReaderDescriptorPath, CpeDescription aDescriptor) protected static CpeCollectionReaderCasInitializer
produceCollectionReaderCasInitializer
(String aInitializerDescriptorPath) Deprecated.As of v2.0, CAS Initializers are deprecated.produceCollectionReaderCasInitializer
(String aPath, CpeDescription aDescriptor) Deprecated.As of v2.0, CAS Initializers are deprecated.static CpeCollectionReaderIterator
static CpeComponentDescriptor
produceComponentDescriptor
(String aPath) static CpeInclude
static CpeCheckpoint
static CpeConfiguration
static CpeConfiguration
produceCpeConfiguration
(CpeDescription aDescriptor) static CpeTimer
produceCpeTimer
(String aTimerClass) static CasProcessorDeploymentParam
static CasProcessorDeploymentParams
static CpeDescription
Produce a new CpeDescription from scratch.static CpeDescription
produceDescriptor
(InputStream aInput) Parse a CpeDescription from a given input stream.static CpeDescription
produceDescriptor
(XMLInputSource aInput) Parse a CpeDescription from a descriptor file.static CpeLocalCasProcessor
produceLocalCasProcessor
(String aName, String aSoFa) static NameValuePair
static CpeRemoteCasProcessor
produceRemoteCasProcessor
(String aName) produceResourceManagerConfiguration
(String aResourceMgrConfigurationPath) produceResourceManagerConfiguration
(String aResourceMgrConfigurationPath, CpeDescription aDescriptor) static CasProcessorRuntimeEnvParam
static CpeSofaMapping
static CpeSofaMappings
-
Constructor Details
-
CpeDescriptorFactory
public CpeDescriptorFactory()
-
-
Method Details
-
produceDescriptor
Produce a new CpeDescription from scratch. This CpeDescription will contain no components and will have default settings.- Returns:
- An empty CpeDescription object with default settings
-
produceDescriptor
Parse a CpeDescription from a descriptor file.- Parameters:
aInput
- identifies the input file- Returns:
- The CpeDescription object parsed from the input
- Throws:
InvalidXMLException
- if the descriptor is invalid
-
produceDescriptor
Parse a CpeDescription from a given input stream.- Parameters:
aInput
- identifies the input stream- Returns:
- The CpeDescription object parsed from the input
- Throws:
InvalidXMLException
- if the descriptor is invalid
-
produceCollectionReader
public static CpeCollectionReader produceCollectionReader(String aCollectionReaderDescriptorPath, CpeDescription aDescriptor) throws CpeDescriptorException - Parameters:
aCollectionReaderDescriptorPath
- a path to the collection reader descriptoraDescriptor
- the descriptor to associate the collection reader with- Returns:
- the CPE Collection Reader
- Throws:
CpeDescriptorException
- if there is a failure
-
produceCollectionReader
public static CpeCollectionReader produceCollectionReader(String aCollectionReaderDescriptorPath) throws CpeDescriptorException - Throws:
CpeDescriptorException
-
produceCollectionReader
- Throws:
CpeDescriptorException
-
produceCollectionReaderIterator
public static CpeCollectionReaderIterator produceCollectionReaderIterator(String aPath) throws CpeDescriptorException - Throws:
CpeDescriptorException
-
produceCollectionReaderCasInitializer
@Deprecated public static CpeCollectionReaderCasInitializer produceCollectionReaderCasInitializer(String aPath, CpeDescription aDescriptor) throws CpeDescriptorException Deprecated.As of v2.0, CAS Initializers are deprecated.- Parameters:
aPath
- don't useaDescriptor
- don't use- Returns:
- a CPE Collection Reader CAS Initializer
- Throws:
CpeDescriptorException
- passed thru
-
produceCollectionReaderCasInitializer
@Deprecated protected static CpeCollectionReaderCasInitializer produceCollectionReaderCasInitializer(String aInitializerDescriptorPath) Deprecated.As of v2.0, CAS Initializers are deprecated.- Parameters:
aInitializerDescriptorPath
- path to the initializer descriptor- Returns:
- CPE Collection Reader CAS Initializer
-
produceComponentDescriptor
- Parameters:
aPath
- The path to the the CPE component Descriptor- Returns:
- the CPE Component Description
-
produceCpeConfiguration
public static CpeConfiguration produceCpeConfiguration(CpeDescription aDescriptor) throws CpeDescriptorException - Parameters:
aDescriptor
- CPE descriptor to use- Returns:
- the Cpe Configuration
- Throws:
CpeDescriptorException
- if it fails
-
produceCpeConfiguration
- Throws:
CpeDescriptorException
-
produceRuntimeEnvParam
-
produceDeployParams
-
produceDeployParam
-
produceComponentDescriptorInclude
-
produceCasProcessors
public static CpeCasProcessors produceCasProcessors(CpeDescription aDescriptor) throws CpeDescriptorException - Parameters:
aDescriptor
- to use to produce the CPE CAS Processors- Returns:
- Cpe CAS Processors
- Throws:
CpeDescriptorException
- if an error occurs
-
produceCasProcessors
- Throws:
CpeDescriptorException
-
produceCasProcessors
public static CpeCasProcessors produceCasProcessors(int aInputQSize, int aOutputQSize, int aPuCount, CpeDescription aDescriptor) throws CpeDescriptorException - Parameters:
aInputQSize
- the input queue sizeaOutputQSize
- the output queue sizeaPuCount
- the number of processing unitsaDescriptor
- the CPE descriptor- Returns:
- CPE CAS Processors
- Throws:
CpeDescriptorException
- if an error occurs
-
produceCasProcessor
-
produceLocalCasProcessor
public static CpeLocalCasProcessor produceLocalCasProcessor(String aName, String aSoFa) throws CpeDescriptorException - Parameters:
aName
- the processor nameaSoFa
- the processor SofA- Returns:
- CPE Local CAS Processor
- Throws:
CpeDescriptorException
- if an error occurs
-
produceRemoteCasProcessor
public static CpeRemoteCasProcessor produceRemoteCasProcessor(String aName) throws CpeDescriptorException - Parameters:
aName
- the processor name- Returns:
- CPE Remote CAS Processor
- Throws:
CpeDescriptorException
- if an error occurs
-
produceCpeTimer
-
produceResourceManagerConfiguration
public static CpeResourceManagerConfiguration produceResourceManagerConfiguration(String aResourceMgrConfigurationPath, CpeDescription aDescriptor) throws CpeDescriptorException - Throws:
CpeDescriptorException
-
produceResourceManagerConfiguration
public static CpeResourceManagerConfiguration produceResourceManagerConfiguration(String aResourceMgrConfigurationPath) throws CpeDescriptorException - Throws:
CpeDescriptorException
-
produceCasProcessorTimeout
-
produceCasProcessorMaxRestarts
-
produceCasProcessorErrorRateThreshold
-
produceCasProcessorFilter
- Parameters:
aFilter
- the filter string- Returns:
- a CAS Processor Filter
-
produceCasProcessorErrorHandling
-
produceCpeCheckpoint
-
produceCasProcessorDeploymentParams
-
produceCasProcessorExecArg
-
produceCasProcessorExecutable
-
produceRunInSeperateProcess
-
produceCasProcessorConfigurationParameterSettings
public static CasProcessorConfigurationParameterSettings produceCasProcessorConfigurationParameterSettings() -
produceNameValuePair
-
produceSofaMapping
-
produceSofaMappings
-