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 CpeIntegratedCasProcessorproduceCasProcessor(String aName) static CasProcessorDeploymentParamsstatic CasProcessorErrorHandlingstatic CasProcessorExecArgstatic CasProcessorExecutablestatic CasProcessorFilterproduceCasProcessorFilter(String aFilter) static CasProcessorMaxRestartsstatic CpeCasProcessorsstatic CpeCasProcessorsproduceCasProcessors(int aInputQSize, int aOutputQSize, int aPuCount, CpeDescription aDescriptor) static CpeCasProcessorsproduceCasProcessors(CpeDescription aDescriptor) static CasProcessorTimeoutstatic CpeCollectionReaderstatic CpeCollectionReaderproduceCollectionReader(String aCollectionReaderDescriptorPath) static CpeCollectionReaderproduceCollectionReader(String aCollectionReaderDescriptorPath, CpeDescription aDescriptor) protected static CpeCollectionReaderCasInitializerproduceCollectionReaderCasInitializer(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 CpeCollectionReaderIteratorstatic CpeComponentDescriptorproduceComponentDescriptor(String aPath) static CpeIncludestatic CpeCheckpointstatic CpeConfigurationstatic CpeConfigurationproduceCpeConfiguration(CpeDescription aDescriptor) static CpeTimerproduceCpeTimer(String aTimerClass) static CasProcessorDeploymentParamstatic CasProcessorDeploymentParamsstatic CpeDescriptionProduce a new CpeDescription from scratch.static CpeDescriptionproduceDescriptor(InputStream aInput) Parse a CpeDescription from a given input stream.static CpeDescriptionproduceDescriptor(XMLInputSource aInput) Parse a CpeDescription from a descriptor file.static CpeLocalCasProcessorproduceLocalCasProcessor(String aName, String aSoFa) static NameValuePairstatic CpeRemoteCasProcessorproduceRemoteCasProcessor(String aName) produceResourceManagerConfiguration(String aResourceMgrConfigurationPath) produceResourceManagerConfiguration(String aResourceMgrConfigurationPath, CpeDescription aDescriptor) static CasProcessorRuntimeEnvParamstatic CpeSofaMappingstatic 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
-