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) Produce cas processor.Produce cas processor configuration parameter settings.static CasProcessorDeploymentParams
Produce cas processor deployment params.static CasProcessorErrorHandling
Produce cas processor error handling.Produce cas processor error rate threshold.static CasProcessorExecArg
Produce cas processor exec arg.static CasProcessorExecutable
Produce cas processor executable.static CasProcessorFilter
produceCasProcessorFilter
(String aFilter) Produce cas processor filter.static CasProcessorMaxRestarts
Produce cas processor max restarts.static CpeCasProcessors
Produce cas processors.static CpeCasProcessors
produceCasProcessors
(int aInputQSize, int aOutputQSize, int aPuCount, CpeDescription aDescriptor) Produce cas processors.static CpeCasProcessors
produceCasProcessors
(CpeDescription aDescriptor) Produce cas processors.static CasProcessorTimeout
Produce cas processor timeout.static CpeCollectionReader
Produce collection reader.static CpeCollectionReader
produceCollectionReader
(String aCollectionReaderDescriptorPath) Produce collection reader.static CpeCollectionReader
produceCollectionReader
(String aCollectionReaderDescriptorPath, CpeDescription aDescriptor) Produce collection reader.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
Produce collection reader iterator.static CpeComponentDescriptor
produceComponentDescriptor
(String aPath) Produce component descriptor.static CpeInclude
Produce component descriptor include.static CpeCheckpoint
Produce cpe checkpoint.static CpeConfiguration
Produce cpe configuration.static CpeConfiguration
produceCpeConfiguration
(CpeDescription aDescriptor) Produce cpe configuration.static CpeTimer
produceCpeTimer
(String aTimerClass) Produce cpe timer.static CasProcessorDeploymentParam
Produce deploy param.static CasProcessorDeploymentParams
Produce deploy params.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) Produce local cas processor.static NameValuePair
Produce name value pair.static CpeRemoteCasProcessor
produceRemoteCasProcessor
(String aName) Produce remote cas processor.produceResourceManagerConfiguration
(String aResourceMgrConfigurationPath) Produce resource manager configuration.produceResourceManagerConfiguration
(String aResourceMgrConfigurationPath, CpeDescription aDescriptor) Produce resource manager configuration.Produce run in seperate process.static CasProcessorRuntimeEnvParam
Produce runtime env param.static CpeSofaMapping
Produce sofa mapping.static CpeSofaMappings
Produce sofa mappings.
-
Constructor Details
-
CpeDescriptorFactory
public CpeDescriptorFactory()Instantiates a new cpe descriptor factory.
-
-
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 Produce collection reader.- 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 Produce collection reader.- Parameters:
aCollectionReaderDescriptorPath
- the a collection reader descriptor path- Returns:
- the cpe collection reader
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
produceCollectionReader
Produce collection reader.- Returns:
- the cpe collection reader
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
produceCollectionReaderIterator
public static CpeCollectionReaderIterator produceCollectionReaderIterator(String aPath) throws CpeDescriptorException Produce collection reader iterator.- Parameters:
aPath
- the a path- Returns:
- the cpe collection reader iterator
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
produceCollectionReaderCasInitializer
@Deprecated public static CpeCollectionReaderCasInitializer produceCollectionReaderCasInitializer(String aPath, CpeDescription aDescriptor) throws CpeDescriptorException Deprecated.As of v2.0, CAS Initializers are deprecated.Produce collection reader cas initializer.- 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.Produce collection reader cas initializer.- Parameters:
aInitializerDescriptorPath
- path to the initializer descriptor- Returns:
- CPE Collection Reader CAS Initializer
-
produceComponentDescriptor
Produce component descriptor.- Parameters:
aPath
- The path to the the CPE component Descriptor- Returns:
- the CPE Component Description
-
produceCpeConfiguration
public static CpeConfiguration produceCpeConfiguration(CpeDescription aDescriptor) throws CpeDescriptorException Produce cpe configuration.- Parameters:
aDescriptor
- CPE descriptor to use- Returns:
- the Cpe Configuration
- Throws:
CpeDescriptorException
- if it fails
-
produceCpeConfiguration
Produce cpe configuration.- Returns:
- the cpe configuration
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
produceRuntimeEnvParam
Produce runtime env param.- Returns:
- the cas processor runtime env param
-
produceDeployParams
Produce deploy params.- Returns:
- the cas processor deployment params
-
produceDeployParam
Produce deploy param.- Returns:
- the cas processor deployment param
-
produceComponentDescriptorInclude
Produce component descriptor include.- Returns:
- the cpe include
-
produceCasProcessors
public static CpeCasProcessors produceCasProcessors(CpeDescription aDescriptor) throws CpeDescriptorException Produce cas processors.- Parameters:
aDescriptor
- to use to produce the CPE CAS Processors- Returns:
- Cpe CAS Processors
- Throws:
CpeDescriptorException
- if an error occurs
-
produceCasProcessors
Produce cas processors.- Returns:
- the cpe cas processors
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
produceCasProcessors
public static CpeCasProcessors produceCasProcessors(int aInputQSize, int aOutputQSize, int aPuCount, CpeDescription aDescriptor) throws CpeDescriptorException Produce cas processors.- 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
Produce cas processor.- Parameters:
aName
- the a name- Returns:
- the cpe integrated cas processor
-
produceLocalCasProcessor
public static CpeLocalCasProcessor produceLocalCasProcessor(String aName, String aSoFa) throws CpeDescriptorException Produce local cas processor.- 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 Produce remote cas processor.- Parameters:
aName
- the processor name- Returns:
- CPE Remote CAS Processor
- Throws:
CpeDescriptorException
- if an error occurs
-
produceCpeTimer
Produce cpe timer.- Parameters:
aTimerClass
- the a timer class- Returns:
- the cpe timer
-
produceResourceManagerConfiguration
public static CpeResourceManagerConfiguration produceResourceManagerConfiguration(String aResourceMgrConfigurationPath, CpeDescription aDescriptor) throws CpeDescriptorException Produce resource manager configuration.- Parameters:
aResourceMgrConfigurationPath
- the a resource mgr configuration pathaDescriptor
- the a descriptor- Returns:
- the cpe resource manager configuration
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
produceResourceManagerConfiguration
public static CpeResourceManagerConfiguration produceResourceManagerConfiguration(String aResourceMgrConfigurationPath) throws CpeDescriptorException Produce resource manager configuration.- Parameters:
aResourceMgrConfigurationPath
- the a resource mgr configuration path- Returns:
- the cpe resource manager configuration
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
produceCasProcessorTimeout
Produce cas processor timeout.- Returns:
- the cas processor timeout
-
produceCasProcessorMaxRestarts
Produce cas processor max restarts.- Returns:
- the cas processor max restarts
-
produceCasProcessorErrorRateThreshold
Produce cas processor error rate threshold.- Returns:
- the cas processor error rate threshold
-
produceCasProcessorFilter
Produce cas processor filter.- Parameters:
aFilter
- the filter string- Returns:
- a CAS Processor Filter
-
produceCasProcessorErrorHandling
Produce cas processor error handling.- Returns:
- the cas processor error handling
-
produceCpeCheckpoint
Produce cpe checkpoint.- Returns:
- the cpe checkpoint
-
produceCasProcessorDeploymentParams
Produce cas processor deployment params.- Returns:
- the cas processor deployment params
-
produceCasProcessorExecArg
Produce cas processor exec arg.- Returns:
- the cas processor exec arg
-
produceCasProcessorExecutable
Produce cas processor executable.- Returns:
- the cas processor executable
-
produceRunInSeperateProcess
Produce run in seperate process.- Returns:
- the cas processor run in seperate process
-
produceCasProcessorConfigurationParameterSettings
public static CasProcessorConfigurationParameterSettings produceCasProcessorConfigurationParameterSettings()Produce cas processor configuration parameter settings.- Returns:
- the cas processor configuration parameter settings
-
produceNameValuePair
Produce name value pair.- Returns:
- the name value pair
-
produceSofaMapping
Produce sofa mapping.- Returns:
- the cpe sofa mapping
-
produceSofaMappings
Produce sofa mappings.- Returns:
- the cpe sofa mappings
-