Examples of CpeLocalCasProcessor


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

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

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
    localProcessor.setDescriptor("c://cpm/annotators/example.xml");
    localProcessor.setExecutable("/some/path/executable.sh");
    localProcessor.addDeployParam("Parm1", "Value1x");
    cpeDesc.addCasProcessor(localProcessor);

    // these calls should ont add default errorhandling etc. to the casProcessor
    cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
    cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
View Full Code Here

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

    remoteProcessor.setTimeout(5000);
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    processors.addCpeCasProcessor(remoteProcessor);

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
    localProcessor.setDescriptor("c://cpm/annotators/wfminers/detag/descriptor.xml");
    localProcessor
            .setExecutable("/home/cwiklik/cpm/wfcp/annotators/wfminers/detagger/bin/runDetagger.sh");
    localProcessor.addDeployParam("Parm1", "Value1");
    localProcessor.addDeployParam("vnsHost", "Host1");
    localProcessor.addExecArg("-DVNS_HOST=127.0.0.1");
    localProcessor.addExecArg("-DVNS_PORT=9904");
    localProcessor.setCasProcessorFilter("where Detag:DetagContent");
    localProcessor.setBatchSize(3);
    localProcessor.setMaxErrorCount(50);
    localProcessor.setMaxErrorSampleSize(500);
    localProcessor.setActionOnMaxError("continue");
    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");
View Full Code Here

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

   */
  public void testAddLocalCasProcessor() throws Exception {
    CpeCasProcessors processors = cpe.getCpeCasProcessors();

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
    localProcessor.setDescriptor("c://cpm/annotators/example.xml");
    localProcessor.setExecutable("/some/path/executable.sh");
    localProcessor.addDeployParam("Parm1", "Value1x");
    localProcessor.addDeployParam("vnsHost", "Host1x");
    localProcessor.addExecArg("-DVNS_HOST=localhost");
    localProcessor.addExecArg("-DVNS_PORT=9905");
    localProcessor.setCasProcessorFilter("where Detag:DetagContent");
    localProcessor.setBatchSize(4);
    localProcessor.setMaxErrorCount(52);
    localProcessor.setMaxErrorSampleSize(503);
    localProcessor.setActionOnMaxError("continue");
    localProcessor.setMaxRestartCount(2);
    localProcessor.setActionOnMaxRestart("continue");
    localProcessor.setTimeout(5001);
    processors.addCpeCasProcessor(localProcessor);

    assertEquals("Name", "DupShingle Miner", localProcessor.getName());
    assertEquals("Descriptor()", "c://cpm/annotators/example.xml", localProcessor.getDescriptor());
    assertEquals("DeploymentParam", "Value1x",
            ((localProcessor.getDeploymentParams()).get("Parm1")).getParameterValue());
    assertEquals("DeploymentParam", "Host1x", ((localProcessor.getDeploymentParams())
            .get("vnsHost")).getParameterValue());
    assertEquals("CasProcessorFilter", "where Detag_colon_DetagContent", localProcessor
            .getCasProcessorFilter());
    assertEquals("BatchSize", 4, localProcessor.getBatchSize());
    assertEquals("MaxErrorCount", 52, localProcessor.getMaxErrorCount());
    assertEquals("MaxErrorSampleSize", 503, localProcessor.getMaxErrorSampleSize());
    assertEquals("ActionOnMaxError", "continue", localProcessor.getActionOnMaxError());
    assertEquals("MaxRestartCount", 2, localProcessor.getMaxRestartCount());
    assertEquals("ActionOnMaxRestart", "continue", localProcessor.getActionOnMaxRestart());
    assertEquals("Timeout", 5001, localProcessor.getTimeout());
  }
View Full Code Here

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

   * @param aSoFa
   * @throws CpeDescriptorException
   */
  public static CpeLocalCasProcessor produceLocalCasProcessor(String aName, String aSoFa)
          throws CpeDescriptorException {
    CpeLocalCasProcessor processor = new CpeLocalCasProcessorImpl();
    processor.setName(aName);
    processor.setSOFA(aSoFa);
    return processor;
  }
View Full Code Here

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

    remoteProcessor.setTimeout(5000);
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    processors.addCpeCasProcessor(remoteProcessor);

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
    localProcessor.setDescriptor("c://cpm/annotators/wfminers/detag/descriptor.xml");
    localProcessor
            .setExecutable("/home/cwiklik/cpm/wfcp/annotators/wfminers/detagger/bin/runDetagger.sh");
    localProcessor.addDeployParam("Parm1", "Value1");
    localProcessor.addDeployParam("vnsHost", "Host1");
    localProcessor.addExecArg("-DVNS_HOST=127.0.0.1");
    localProcessor.addExecArg("-DVNS_PORT=9904");
    localProcessor.setCasProcessorFilter("where Detag:DetagContent");
    localProcessor.setBatchSize(3);
    localProcessor.setMaxErrorCount(50);
    localProcessor.setMaxErrorSampleSize(500);
    localProcessor.setActionOnMaxError("continue");
    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");
View Full Code Here

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

   */
  public void testAddLocalCasProcessor() throws Exception {
    CpeCasProcessors processors = cpe.getCpeCasProcessors();

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
    localProcessor.setDescriptor("c://cpm/annotators/example.xml");
    localProcessor.setExecutable("/some/path/executable.sh");
    localProcessor.addDeployParam("Parm1", "Value1x");
    localProcessor.addDeployParam("vnsHost", "Host1x");
    localProcessor.addExecArg("-DVNS_HOST=localhost");
    localProcessor.addExecArg("-DVNS_PORT=9905");
    localProcessor.setCasProcessorFilter("where Detag:DetagContent");
    localProcessor.setBatchSize(4);
    localProcessor.setMaxErrorCount(52);
    localProcessor.setMaxErrorSampleSize(503);
    localProcessor.setActionOnMaxError("continue");
    localProcessor.setMaxRestartCount(2);
    localProcessor.setActionOnMaxRestart("continue");
    localProcessor.setTimeout(5001);
    processors.addCpeCasProcessor(localProcessor);

    assertEquals("Name", "DupShingle Miner", localProcessor.getName());
    assertEquals("Descriptor()", "c://cpm/annotators/example.xml", localProcessor.getDescriptor());
    assertEquals("DeploymentParam", "Value1x",
            ((localProcessor.getDeploymentParams()).get("Parm1")).getParameterValue());
    assertEquals("DeploymentParam", "Host1x", ((localProcessor.getDeploymentParams())
            .get("vnsHost")).getParameterValue());
    assertEquals("CasProcessorFilter", "where Detag_colon_DetagContent", localProcessor
            .getCasProcessorFilter());
    assertEquals("BatchSize", 4, localProcessor.getBatchSize());
    assertEquals("MaxErrorCount", 52, localProcessor.getMaxErrorCount());
    assertEquals("MaxErrorSampleSize", 503, localProcessor.getMaxErrorSampleSize());
    assertEquals("ActionOnMaxError", "continue", localProcessor.getActionOnMaxError());
    assertEquals("MaxRestartCount", 2, localProcessor.getMaxRestartCount());
    assertEquals("ActionOnMaxRestart", "continue", localProcessor.getActionOnMaxRestart());
    assertEquals("Timeout", 5001, localProcessor.getTimeout());
  }
View Full Code Here

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

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

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
    localProcessor.setDescriptor("c://cpm/annotators/example.xml");
    localProcessor.setExecutable("/some/path/executable.sh");
    localProcessor.addDeployParam("Parm1", "Value1x");
    cpeDesc.addCasProcessor(localProcessor);

    // these calls should ont add default errorhandling etc. to the casProcessor
    cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
    cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
View Full Code Here

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

   * @return CPE Local CAS Processor
   * @throws CpeDescriptorException if an error occurs
   */
  public static CpeLocalCasProcessor produceLocalCasProcessor(String aName, String aSoFa)
          throws CpeDescriptorException {
    CpeLocalCasProcessor processor = new CpeLocalCasProcessorImpl();
    processor.setName(aName);
    processor.setSOFA(aSoFa);
    return processor;
  }
View Full Code Here

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

   * @param aSoFa
   * @throws CpeDescriptorException
   */
  public static CpeLocalCasProcessor produceLocalCasProcessor(String aName, String aSoFa)
          throws CpeDescriptorException {
    CpeLocalCasProcessor processor = new CpeLocalCasProcessorImpl();
    processor.setName(aName);
    processor.setSOFA(aSoFa);
    return processor;
  }
View Full Code Here

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

    remoteProcessor.setTimeout(5000);
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    processors.addCpeCasProcessor(remoteProcessor);

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
    localProcessor.setDescriptor("c://cpm/annotators/wfminers/detag/descriptor.xml");
    localProcessor
            .setExecutable("/home/cwiklik/cpm/wfcp/annotators/wfminers/detagger/bin/runDetagger.sh");
    localProcessor.addDeployParam("Parm1", "Value1");
    localProcessor.addDeployParam("vnsHost", "Host1");
    localProcessor.addExecArg("-DVNS_HOST=127.0.0.1");
    localProcessor.addExecArg("-DVNS_PORT=9904");
    localProcessor.setCasProcessorFilter("where Detag:DetagContent");
    localProcessor.setBatchSize(3);
    localProcessor.setMaxErrorCount(50);
    localProcessor.setMaxErrorSampleSize(500);
    localProcessor.setActionOnMaxError("continue");
    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");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.