Package org.apache.uima.collection.metadata

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


            + "casinitializers/WFReaderInitializer.xml", cpe);
    // Create CasProcessors
    CpeCasProcessors processors = CpeDescriptorFactory.produceCasProcessors(2, 4, 3, cpe);
    // Create Detag CasProcessor

    CpeRemoteCasProcessor remoteProcessor = CpeDescriptorFactory
            .produceRemoteCasProcessor("Detag Miner");
    // CpeComponentDescriptor detagDesc =
    // CpeDescriptorFactory.produceComponentDescriptor("c://cpm/annotators/wfminers/detag/service.xml");
    remoteProcessor.setDescriptor("c://cpm/annotators/wfminers/detag/service.xml"); // detagDesc);
    remoteProcessor.addDeployParam("vnsPort", "9003");
    remoteProcessor.addDeployParam("vnsHost", "localhost");
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    remoteProcessor.setBatchSize(3);
    remoteProcessor.setMaxErrorCount(50);
    remoteProcessor.setMaxErrorSampleSize(500);
    remoteProcessor.setActionOnMaxError("continue");
    remoteProcessor.setMaxRestartCount(3);
    remoteProcessor.setActionOnMaxRestart("continue");
    remoteProcessor.setTimeout(5000);
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    processors.addCpeCasProcessor(remoteProcessor);

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
View Full Code Here


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

    CpeRemoteCasProcessor remoteProcessor = CpeDescriptorFactory
            .produceRemoteCasProcessor("Detag Miner _2_");
    remoteProcessor.setDescriptor("c://cpm/annotators/dummy.xml");
    remoteProcessor.addDeployParam("vnsPort", "9999");
    remoteProcessor.addDeployParam("vnsHost", "localhost");
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent_2");
    remoteProcessor.setBatchSize(5);
    remoteProcessor.setMaxErrorCount(51);
    remoteProcessor.setMaxErrorSampleSize(505);
    remoteProcessor.setActionOnMaxError("continue");
    remoteProcessor.setMaxRestartCount(2);
    remoteProcessor.setActionOnMaxRestart("continue");
    remoteProcessor.setTimeout(5002);
    processors.addCpeCasProcessor(remoteProcessor);

    assertEquals("Name", "Detag Miner _2_", remoteProcessor.getName());
    assertEquals("Descriptor()", "c://cpm/annotators/dummy.xml", remoteProcessor.getDescriptor());
    assertEquals("DeploymentParam", "9999",
            ((remoteProcessor.getDeploymentParams()).get("vnsPort")).getParameterValue());
    assertEquals("DeploymentParam", "localhost", ((remoteProcessor.getDeploymentParams())
            .get("vnsHost")).getParameterValue());
    assertEquals("CasProcessorFilter", "where Detag_colon_DetagContent_2", remoteProcessor
            .getCasProcessorFilter());
    assertEquals("BatchSize", 5, remoteProcessor.getBatchSize());
    assertEquals("MaxErrorCount", 51, remoteProcessor.getMaxErrorCount());
    assertEquals("MaxErrorSampleSize", 505, remoteProcessor.getMaxErrorSampleSize());
    assertEquals("ActionOnMaxError", "continue", remoteProcessor.getActionOnMaxError());
    assertEquals("MaxRestartCount", 2, remoteProcessor.getMaxRestartCount());
    assertEquals("ActionOnMaxRestart", "continue", remoteProcessor.getActionOnMaxRestart());
    assertEquals("Timeout", 5002, remoteProcessor.getTimeout());
  }
View Full Code Here

   * @param aName
   * @throws CpeDescriptorException
   */
  public static CpeRemoteCasProcessor produceRemoteCasProcessor(String aName)
          throws CpeDescriptorException {
    CpeRemoteCasProcessor processor = new CpeRemoteCasProcessorImpl();
    processor.setName(aName);
    return processor;
  }
View Full Code Here

            + "casinitializers/WFReaderInitializer.xml", cpe);
    // Create CasProcessors
    CpeCasProcessors processors = CpeDescriptorFactory.produceCasProcessors(2, 4, 3, cpe);
    // Create Detag CasProcessor

    CpeRemoteCasProcessor remoteProcessor = CpeDescriptorFactory
            .produceRemoteCasProcessor("Detag Miner");
    // CpeComponentDescriptor detagDesc =
    // CpeDescriptorFactory.produceComponentDescriptor("c://cpm/annotators/wfminers/detag/service.xml");
    remoteProcessor.setDescriptor("c://cpm/annotators/wfminers/detag/service.xml"); // detagDesc);
    remoteProcessor.addDeployParam("vnsPort", "9003");
    remoteProcessor.addDeployParam("vnsHost", "localhost");
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    remoteProcessor.setBatchSize(3);
    remoteProcessor.setMaxErrorCount(50);
    remoteProcessor.setMaxErrorSampleSize(500);
    remoteProcessor.setActionOnMaxError("continue");
    remoteProcessor.setMaxRestartCount(3);
    remoteProcessor.setActionOnMaxRestart("continue");
    remoteProcessor.setTimeout(5000);
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    processors.addCpeCasProcessor(remoteProcessor);

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
View Full Code Here

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

    CpeRemoteCasProcessor remoteProcessor = CpeDescriptorFactory
            .produceRemoteCasProcessor("Detag Miner _2_");
    remoteProcessor.setDescriptor("c://cpm/annotators/dummy.xml");
    remoteProcessor.addDeployParam("vnsPort", "9999");
    remoteProcessor.addDeployParam("vnsHost", "localhost");
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent_2");
    remoteProcessor.setBatchSize(5);
    remoteProcessor.setMaxErrorCount(51);
    remoteProcessor.setMaxErrorSampleSize(505);
    remoteProcessor.setActionOnMaxError("continue");
    remoteProcessor.setMaxRestartCount(2);
    remoteProcessor.setActionOnMaxRestart("continue");
    remoteProcessor.setTimeout(5002);
    processors.addCpeCasProcessor(remoteProcessor);

    assertEquals("Name", "Detag Miner _2_", remoteProcessor.getName());
    assertEquals("Descriptor()", "c://cpm/annotators/dummy.xml", remoteProcessor.getDescriptor());
    assertEquals("DeploymentParam", "9999",
            ((remoteProcessor.getDeploymentParams()).get("vnsPort")).getParameterValue());
    assertEquals("DeploymentParam", "localhost", ((remoteProcessor.getDeploymentParams())
            .get("vnsHost")).getParameterValue());
    assertEquals("CasProcessorFilter", "where Detag_colon_DetagContent_2", remoteProcessor
            .getCasProcessorFilter());
    assertEquals("BatchSize", 5, remoteProcessor.getBatchSize());
    assertEquals("MaxErrorCount", 51, remoteProcessor.getMaxErrorCount());
    assertEquals("MaxErrorSampleSize", 505, remoteProcessor.getMaxErrorSampleSize());
    assertEquals("ActionOnMaxError", "continue", remoteProcessor.getActionOnMaxError());
    assertEquals("MaxRestartCount", 2, remoteProcessor.getMaxRestartCount());
    assertEquals("ActionOnMaxRestart", "continue", remoteProcessor.getActionOnMaxRestart());
    assertEquals("Timeout", 5002, remoteProcessor.getTimeout());
  }
View Full Code Here

   * @return CPE Remote CAS Processor
   * @throws CpeDescriptorException if an error occurs
   */
  public static CpeRemoteCasProcessor produceRemoteCasProcessor(String aName)
          throws CpeDescriptorException {
    CpeRemoteCasProcessor processor = new CpeRemoteCasProcessorImpl();
    processor.setName(aName);
    return processor;
  }
View Full Code Here

   * @param aName
   * @throws CpeDescriptorException
   */
  public static CpeRemoteCasProcessor produceRemoteCasProcessor(String aName)
          throws CpeDescriptorException {
    CpeRemoteCasProcessor processor = new CpeRemoteCasProcessorImpl();
    processor.setName(aName);
    return processor;
  }
View Full Code Here

            + "casinitializers/WFReaderInitializer.xml", cpe);
    // Create CasProcessors
    CpeCasProcessors processors = CpeDescriptorFactory.produceCasProcessors(2, 4, 3, cpe);
    // Create Detag CasProcessor

    CpeRemoteCasProcessor remoteProcessor = CpeDescriptorFactory
            .produceRemoteCasProcessor("Detag Miner");
    // CpeComponentDescriptor detagDesc =
    // CpeDescriptorFactory.produceComponentDescriptor("c://cpm/annotators/wfminers/detag/service.xml");
    remoteProcessor.setDescriptor("c://cpm/annotators/wfminers/detag/service.xml"); // detagDesc);
    remoteProcessor.addDeployParam("vnsPort", "9003");
    remoteProcessor.addDeployParam("vnsHost", "localhost");
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    remoteProcessor.setBatchSize(3);
    remoteProcessor.setMaxErrorCount(50);
    remoteProcessor.setMaxErrorSampleSize(500);
    remoteProcessor.setActionOnMaxError("continue");
    remoteProcessor.setMaxRestartCount(3);
    remoteProcessor.setActionOnMaxRestart("continue");
    remoteProcessor.setTimeout(5000);
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
    processors.addCpeCasProcessor(remoteProcessor);

    // Create Detag CasProcessor
    CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
            "DupShingle Miner", "Detag:DetagContent");
View Full Code Here

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

    CpeRemoteCasProcessor remoteProcessor = CpeDescriptorFactory
            .produceRemoteCasProcessor("Detag Miner _2_");
    remoteProcessor.setDescriptor("c://cpm/annotators/dummy.xml");
    remoteProcessor.addDeployParam("vnsPort", "9999");
    remoteProcessor.addDeployParam("vnsHost", "localhost");
    remoteProcessor.setCasProcessorFilter("where Detag:DetagContent_2");
    remoteProcessor.setBatchSize(5);
    remoteProcessor.setMaxErrorCount(51);
    remoteProcessor.setMaxErrorSampleSize(505);
    remoteProcessor.setActionOnMaxError("continue");
    remoteProcessor.setMaxRestartCount(2);
    remoteProcessor.setActionOnMaxRestart("continue");
    remoteProcessor.setTimeout(5002);
    processors.addCpeCasProcessor(remoteProcessor);

    assertEquals("Name", "Detag Miner _2_", remoteProcessor.getName());
    assertEquals("Descriptor()", "c://cpm/annotators/dummy.xml", remoteProcessor.getDescriptor());
    assertEquals("DeploymentParam", "9999",
            ((remoteProcessor.getDeploymentParams()).get("vnsPort")).getParameterValue());
    assertEquals("DeploymentParam", "localhost", ((remoteProcessor.getDeploymentParams())
            .get("vnsHost")).getParameterValue());
    assertEquals("CasProcessorFilter", "where Detag_colon_DetagContent_2", remoteProcessor
            .getCasProcessorFilter());
    assertEquals("BatchSize", 5, remoteProcessor.getBatchSize());
    assertEquals("MaxErrorCount", 51, remoteProcessor.getMaxErrorCount());
    assertEquals("MaxErrorSampleSize", 505, remoteProcessor.getMaxErrorSampleSize());
    assertEquals("ActionOnMaxError", "continue", remoteProcessor.getActionOnMaxError());
    assertEquals("MaxRestartCount", 2, remoteProcessor.getMaxRestartCount());
    assertEquals("ActionOnMaxRestart", "continue", remoteProcessor.getActionOnMaxRestart());
    assertEquals("Timeout", 5002, remoteProcessor.getTimeout());
  }
View Full Code Here

   * @param aName
   * @throws CpeDescriptorException
   */
  public static CpeRemoteCasProcessor produceRemoteCasProcessor(String aName)
          throws CpeDescriptorException {
    CpeRemoteCasProcessor processor = new CpeRemoteCasProcessorImpl();
    processor.setName(aName);
    return processor;
  }
View Full Code Here

TOP

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

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.