Package org.apache.uima.collection.metadata

Examples of org.apache.uima.collection.metadata.CpeIntegratedCasProcessor


            functionName);

    CpeDescription cpeDesc = (CpeDescription) objs[0];
    cpeDesc.setProcessingUnitThreadCount(1);
    cpeDesc.setNumToProcess(20);
    CpeIntegratedCasProcessor integratedProcessor = (CpeIntegratedCasProcessor) objs[1];
    integratedProcessor.setActionOnMaxError("terminate");
    CollectionProcessingEngine cpe = UIMAFramework.produceCollectionProcessingEngine(cpeDesc, null,
            null);

    // Create and register a Status Callback Listener
    // listener = new CollectionReaderStatusCallbackListener(cpe);
View Full Code Here


      // secondly, create the cpm based on the descriptors
      cpeDesc = CpeDescriptorFactory.produceDescriptor();

      // managing the default behaviour of this client
      CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
              .produceCasProcessor("ErrorTestAnnotator");
      integratedProcessor.setDescriptor(taeDesc);

      CpeIntegratedCasProcessor casConsumer = CpeDescriptorFactory
              .produceCasProcessor("ErrorTest CasConsumer");
      casConsumer.setDescriptor(casConsumerDesc);

      // - add all descriptors
      cpeDesc.addCollectionReader(colReaderDesc);
      cpeDesc.addCasProcessor(integratedProcessor);
      cpeDesc.addCasProcessor(casConsumer);
View Full Code Here

         // secondly, create the cpm based on the descriptors
         cpeDesc = CpeDescriptorFactory.produceDescriptor();

         // managing the default behaviour of this client
         CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
               .produceCasProcessor("ErrorTestAnnotator");
         integratedProcessor.setDescriptor(taeDesc);

         CpeIntegratedCasProcessor casConsumer = CpeDescriptorFactory
               .produceCasProcessor("ErrorTest CasConsumer");
         casConsumer.setDescriptor(casConsumerDesc);

         // - add all descriptors
         cpeDesc.addCollectionReader(colReaderDesc);
         cpeDesc.addCasProcessor(integratedProcessor);
         cpeDesc.addCasProcessor(casConsumer);
View Full Code Here

    cpeDesc.setInputQueueSize(2);
    cpeDesc.setOutputQueueSize(2);
    cpeDesc.setProcessingUnitThreadCount(threadCount);

    // add tae
    CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
            .produceCasProcessor("ErrorTestAnnotator");
    integratedProcessor.setDescriptor(taeDesc);
    cpeDesc.addCasProcessor(integratedProcessor);

    // add slow annotator if requested
    if (useSlowAnnotator) {
      CpeIntegratedCasProcessor slowProcessor = CpeDescriptorFactory
              .produceCasProcessor("SlowAnnotator");
      slowProcessor.setDescriptor(JUnitExtension.getFile("CpmTests" + separator + "SlowAnnotator.xml").getAbsolutePath());
      cpeDesc.addCasProcessor(slowProcessor);
    }

    // add casConsumer
    CpeIntegratedCasProcessor casConsumer = CpeDescriptorFactory
            .produceCasProcessor("ErrorTest CasConsumer");
    casConsumer.setDescriptor(casConsumerDesc);
    cpeDesc.addCasProcessor(casConsumer);

    // add collectionReader
    cpeDesc.addCollectionReader(colReaderDesc);
View Full Code Here

      cpeDesc.setInputQueueSize(2);
      cpeDesc.setOutputQueueSize(2);
      cpeDesc.setProcessingUnitThreadCount(threadCount);

      // add tae
      CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
              .produceCasProcessor("ErrorTestAnnotator");
      integratedProcessor.setDescriptor(taeDesc);
      cpeDesc.addCasProcessor(integratedProcessor);

      // add casConsumer
      CpeIntegratedCasProcessor casConsumer = CpeDescriptorFactory
              .produceCasProcessor("ErrorTest CasConsumer");
      casConsumer.setDescriptor(casConsumerDesc);
      cpeDesc.addCasProcessor(casConsumer);

      // add collectionReader
      cpeDesc.addCollectionReader(colReaderDesc);
View Full Code Here

    // output file
    File refFile = JUnitExtension.getFile("CpmTests/CpeAPITest/testIntegratedDesc.xml");

    // add a new iCpe
    CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
            .produceCasProcessor("WF Writer_X");
    integratedProcessor.setDescriptor("c://cpm/conf/consumers/bla.xml");
    integratedProcessor.setBatchSize(99);
    cpeDesc.addCasProcessor(integratedProcessor);

    // every call adds default errorhandling etc. to the casProcessor
    cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
    cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
View Full Code Here

      cpeDesc.setOutputQueueSize(threadCount);
      cpeDesc.setProcessingUnitThreadCount(threadCount);
      cpeDesc.getCpeCasProcessors().setPoolSize(poolSize);

      // add tae
      CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
              .produceCasProcessor("ErrorTestAnnotator");
      integratedProcessor.setDescriptor(taeDesc);
      cpeDesc.addCasProcessor(integratedProcessor);

      // add casConsumer
      CpeIntegratedCasProcessor casConsumer = CpeDescriptorFactory
              .produceCasProcessor("ErrorTest CasConsumer");
      casConsumer.setDescriptor(casConsumerDesc);
      cpeDesc.addCasProcessor(casConsumer);

      // add collectionReader
      cpeDesc.addCollectionReader(colReaderDesc);
View Full Code Here

      if (singleThreaded) {
        cpeDesc.setDeployment("single-threaded");
      }

      // add tae
      CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
              .produceCasProcessor("ErrorTestAnnotator");
      integratedProcessor.setDescriptor(taeDesc);
      cpeDesc.addCasProcessor(integratedProcessor);

      // add slow annotator if requested
      if (useSlowAnnotator) {
        CpeIntegratedCasProcessor slowProcessor = CpeDescriptorFactory
                .produceCasProcessor("SlowAnnotator");
        slowProcessor.setDescriptor(JUnitExtension.getFile("CpmTests" + separator
                + "SlowAnnotator.xml").getAbsolutePath());
        cpeDesc.addCasProcessor(slowProcessor);
      }

      // add casConsumer
      CpeIntegratedCasProcessor casConsumer = CpeDescriptorFactory
              .produceCasProcessor("ErrorTest CasConsumer");
      casConsumer.setDescriptor(casConsumerDesc);
      cpeDesc.addCasProcessor(casConsumer);

      // add collectionReader
      cpeDesc.addCollectionReader(colReaderDesc);
View Full Code Here

      // secondly, create the cpm based on the descriptors
      cpeDesc = CpeDescriptorFactory.produceDescriptor();

      // managing the default behaviour of this client
      CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
              .produceCasProcessor("ErrorTestAnnotator");
      integratedProcessor.setDescriptor(taeDesc);
      integratedProcessor.setActionOnMaxError("terminate");

      CpeIntegratedCasProcessor casConsumer = CpeDescriptorFactory
              .produceCasProcessor("ErrorTest CasConsumer");
      casConsumer.setDescriptor(casConsumerDesc);

      // - add all descriptors
      cpeDesc.addCollectionReader(colReaderDesc);
      cpeDesc.addCasProcessor(integratedProcessor);
      cpeDesc.addCasProcessor(casConsumer);
View Full Code Here

    localProcessor.setMaxRestartCount(3);
    localProcessor.setActionOnMaxRestart("continue");
    localProcessor.setTimeout(5000);
    processors.addCpeCasProcessor(localProcessor);

    CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
            .produceCasProcessor("WF Writer");
    integratedProcessor.setDescriptor(confLocation + "consumers/wf/store/descriptor.xml");
    integratedProcessor.setBatchSize(100);
    processors.addCpeCasProcessor(integratedProcessor);

    CpeConfiguration config = CpeDescriptorFactory.produceCpeConfiguration(cpe);
    CpeCheckpoint checkpoint = CpeDescriptorFactory.produceCpeCheckpoint();
    checkpoint.setBatchSize(10);
View Full Code Here

TOP

Related Classes of org.apache.uima.collection.metadata.CpeIntegratedCasProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.