Class CpeDescriptorFactory

java.lang.Object
org.apache.uima.collection.impl.metadata.cpe.CpeDescriptorFactory

public class CpeDescriptorFactory extends Object
Factory class for creating CpeDescriptors and their constituent objects.
  • Constructor Details

    • CpeDescriptorFactory

      public CpeDescriptorFactory()
      Instantiates a new cpe descriptor factory.
  • Method Details

    • 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(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(String aCollectionReaderDescriptorPath, CpeDescription aDescriptor) throws CpeDescriptorException
      Produce collection reader.
      Parameters:
      aCollectionReaderDescriptorPath - a path to the collection reader descriptor
      aDescriptor - 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

      public static CpeCollectionReader produceCollectionReader() throws CpeDescriptorException
      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 use
      aDescriptor - 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

      public static CpeComponentDescriptor produceComponentDescriptor(String aPath)
      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

      public static CpeConfiguration produceCpeConfiguration() throws CpeDescriptorException
      Produce cpe configuration.
      Returns:
      the cpe configuration
      Throws:
      CpeDescriptorException - the cpe descriptor exception
    • produceRuntimeEnvParam

      public static CasProcessorRuntimeEnvParam produceRuntimeEnvParam()
      Produce runtime env param.
      Returns:
      the cas processor runtime env param
    • produceDeployParams

      public static CasProcessorDeploymentParams produceDeployParams()
      Produce deploy params.
      Returns:
      the cas processor deployment params
    • produceDeployParam

      public static CasProcessorDeploymentParam produceDeployParam()
      Produce deploy param.
      Returns:
      the cas processor deployment param
    • produceComponentDescriptorInclude

      public static CpeInclude 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

      public static CpeCasProcessors produceCasProcessors() throws CpeDescriptorException
      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 size
      aOutputQSize - the output queue size
      aPuCount - the number of processing units
      aDescriptor - the CPE descriptor
      Returns:
      CPE CAS Processors
      Throws:
      CpeDescriptorException - if an error occurs
    • produceCasProcessor

      public static CpeIntegratedCasProcessor produceCasProcessor(String aName)
      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 name
      aSoFa - 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

      public static CpeTimer produceCpeTimer(String aTimerClass)
      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 path
      aDescriptor - 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

      public static CasProcessorTimeout produceCasProcessorTimeout()
      Produce cas processor timeout.
      Returns:
      the cas processor timeout
    • produceCasProcessorMaxRestarts

      public static CasProcessorMaxRestarts produceCasProcessorMaxRestarts()
      Produce cas processor max restarts.
      Returns:
      the cas processor max restarts
    • produceCasProcessorErrorRateThreshold

      public static CasProcessorErrorRateThreshold produceCasProcessorErrorRateThreshold()
      Produce cas processor error rate threshold.
      Returns:
      the cas processor error rate threshold
    • produceCasProcessorFilter

      public static CasProcessorFilter produceCasProcessorFilter(String aFilter)
      Produce cas processor filter.
      Parameters:
      aFilter - the filter string
      Returns:
      a CAS Processor Filter
    • produceCasProcessorErrorHandling

      public static CasProcessorErrorHandling produceCasProcessorErrorHandling()
      Produce cas processor error handling.
      Returns:
      the cas processor error handling
    • produceCpeCheckpoint

      public static CpeCheckpoint produceCpeCheckpoint()
      Produce cpe checkpoint.
      Returns:
      the cpe checkpoint
    • produceCasProcessorDeploymentParams

      public static CasProcessorDeploymentParams produceCasProcessorDeploymentParams()
      Produce cas processor deployment params.
      Returns:
      the cas processor deployment params
    • produceCasProcessorExecArg

      public static CasProcessorExecArg produceCasProcessorExecArg()
      Produce cas processor exec arg.
      Returns:
      the cas processor exec arg
    • produceCasProcessorExecutable

      public static CasProcessorExecutable produceCasProcessorExecutable()
      Produce cas processor executable.
      Returns:
      the cas processor executable
    • produceRunInSeperateProcess

      public static CasProcessorRunInSeperateProcess 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

      public static NameValuePair produceNameValuePair()
      Produce name value pair.
      Returns:
      the name value pair
    • produceSofaMapping

      public static CpeSofaMapping produceSofaMapping()
      Produce sofa mapping.
      Returns:
      the cpe sofa mapping
    • produceSofaMappings

      public static CpeSofaMappings produceSofaMappings()
      Produce sofa mappings.
      Returns:
      the cpe sofa mappings