Class CpeDescriptorFactory
- java.lang.Object
-
- org.apache.uima.collection.impl.metadata.cpe.CpeDescriptorFactory
-
public class CpeDescriptorFactory extends java.lang.Object
Factory class for creating CpeDescriptors and their constituent objects.
-
-
Constructor Summary
Constructors Constructor Description CpeDescriptorFactory()
-
Method Summary
-
-
-
Method Detail
-
produceDescriptor
public static CpeDescription 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
public static CpeDescription produceDescriptor(XMLInputSource aInput) throws InvalidXMLException
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
public static CpeDescription produceDescriptor(java.io.InputStream aInput) throws InvalidXMLException
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(java.lang.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(java.lang.String aCollectionReaderDescriptorPath) throws CpeDescriptorException
- Throws:
CpeDescriptorException
-
produceCollectionReader
public static CpeCollectionReader produceCollectionReader() throws CpeDescriptorException
- Throws:
CpeDescriptorException
-
produceCollectionReaderIterator
public static CpeCollectionReaderIterator produceCollectionReaderIterator(java.lang.String aPath) throws CpeDescriptorException
- Throws:
CpeDescriptorException
-
produceCollectionReaderCasInitializer
@Deprecated public static CpeCollectionReaderCasInitializer produceCollectionReaderCasInitializer(java.lang.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(java.lang.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
public static CpeComponentDescriptor produceComponentDescriptor(java.lang.String aPath)
- 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
public static CpeConfiguration produceCpeConfiguration() throws CpeDescriptorException
- Throws:
CpeDescriptorException
-
produceRuntimeEnvParam
public static CasProcessorRuntimeEnvParam produceRuntimeEnvParam()
-
produceDeployParams
public static CasProcessorDeploymentParams produceDeployParams()
-
produceDeployParam
public static CasProcessorDeploymentParam produceDeployParam()
-
produceComponentDescriptorInclude
public static CpeInclude 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
public static CpeCasProcessors produceCasProcessors() throws CpeDescriptorException
- 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
public static CpeIntegratedCasProcessor produceCasProcessor(java.lang.String aName)
-
produceLocalCasProcessor
public static CpeLocalCasProcessor produceLocalCasProcessor(java.lang.String aName, java.lang.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(java.lang.String aName) throws CpeDescriptorException
- Parameters:
aName
- the processor name- Returns:
- CPE Remote CAS Processor
- Throws:
CpeDescriptorException
- if an error occurs
-
produceCpeTimer
public static CpeTimer produceCpeTimer(java.lang.String aTimerClass)
-
produceResourceManagerConfiguration
public static CpeResourceManagerConfiguration produceResourceManagerConfiguration(java.lang.String aResourceMgrConfigurationPath, CpeDescription aDescriptor) throws CpeDescriptorException
- Throws:
CpeDescriptorException
-
produceResourceManagerConfiguration
public static CpeResourceManagerConfiguration produceResourceManagerConfiguration(java.lang.String aResourceMgrConfigurationPath) throws CpeDescriptorException
- Throws:
CpeDescriptorException
-
produceCasProcessorTimeout
public static CasProcessorTimeout produceCasProcessorTimeout()
-
produceCasProcessorMaxRestarts
public static CasProcessorMaxRestarts produceCasProcessorMaxRestarts()
-
produceCasProcessorErrorRateThreshold
public static CasProcessorErrorRateThreshold produceCasProcessorErrorRateThreshold()
-
produceCasProcessorFilter
public static CasProcessorFilter produceCasProcessorFilter(java.lang.String aFilter)
- Parameters:
aFilter
- the filter string- Returns:
- a CAS Processor Filter
-
produceCasProcessorErrorHandling
public static CasProcessorErrorHandling produceCasProcessorErrorHandling()
-
produceCpeCheckpoint
public static CpeCheckpoint produceCpeCheckpoint()
-
produceCasProcessorDeploymentParams
public static CasProcessorDeploymentParams produceCasProcessorDeploymentParams()
-
produceCasProcessorExecArg
public static CasProcessorExecArg produceCasProcessorExecArg()
-
produceCasProcessorExecutable
public static CasProcessorExecutable produceCasProcessorExecutable()
-
produceRunInSeperateProcess
public static CasProcessorRunInSeperateProcess produceRunInSeperateProcess()
-
produceCasProcessorConfigurationParameterSettings
public static CasProcessorConfigurationParameterSettings produceCasProcessorConfigurationParameterSettings()
-
produceNameValuePair
public static NameValuePair produceNameValuePair()
-
produceSofaMapping
public static CpeSofaMapping produceSofaMapping()
-
produceSofaMappings
public static CpeSofaMappings produceSofaMappings()
-
-