Examples of reconfigure()


Examples of org.apache.uima.analysis_engine.AnalysisEngine.reconfigure()

      assertTrue(FlowControllerForErrorTest.abortedDocuments.isEmpty());
      assertTrue(FlowControllerForErrorTest.failedAEs.isEmpty());
     
      //configure AE to continue after error
      ae.setConfigParameterValue("ContinueOnFailure", Boolean.TRUE);
      ae.reconfigure();
      cas.reset();
      cas.setDocumentText("ERROR");
      UIMAFramework.getLogger().setLevel(Level.OFF)// Suppress logging of expected exception
      ae.process(cas); //should not throw exception now
      UIMAFramework.getLogger().setLevel(Level.INFO); // Restore to apparent default of INFO
View Full Code Here

Examples of org.apache.uima.analysis_engine.AnalysisEngine.reconfigure()

      assertTrue(FlowControllerForErrorTest.failedAEs.contains("Segmenter"));

      //configure AE to continue after error
      ae = UIMAFramework.produceAnalysisEngine(aggWithBadSegmenterDesc);
      ae.setConfigParameterValue("ContinueOnFailure", Boolean.TRUE);
      ae.reconfigure();
      FlowControllerForErrorTest.reset();

      cas.reset();
      cas.setDocumentText("Line one\nLine two\nLine three");
      iter = ae.processAndOutputNewCASes(cas);
View Full Code Here

Examples of org.apache.uima.analysis_engine.AnalysisEngine.reconfigure()

      assertTrue(FlowControllerForErrorTest.abortedDocuments.isEmpty());
      assertTrue(FlowControllerForErrorTest.failedAEs.isEmpty());
     
      //configure AE to continue after error
      ae.setConfigParameterValue("ContinueOnFailure", Boolean.TRUE);
      ae.reconfigure();
      cas.reset();
      cas.setDocumentText("ERROR");
      UIMAFramework.getLogger().setLevel(Level.OFF)// Suppress logging of expected exception
      ae.process(cas); //should not throw exception now
      UIMAFramework.getLogger().setLevel(Level.INFO); // Restore to apparent default of INFO
View Full Code Here

Examples of org.apache.uima.analysis_engine.TextAnalysisEngine.reconfigure()

        // check value of string param (TestAnnotator saves it in a static field)
        assertEquals("Test1", TestAnnotator.stringParamValue);

        // reconfigure
        tae.setConfigParameterValue("StringParam", "Test2");
        tae.reconfigure();

        //test again
        assertEquals("Test2", TestAnnotator.stringParamValue);

        // check pool metadata
View Full Code Here

Examples of org.apache.uima.analysis_engine.asb.impl.FlowControllerContainer.reconfigure()

      ConfigurableResource component = (ConfigurableResource) it.next();
      component.reconfigure();
    }
    //and the FlowController
    FlowControllerContainer fcc = ((ASB_impl) _getASB()).getFlowControllerContainer();
    fcc.reconfigure();
  }

  public void batchProcessComplete() throws AnalysisEngineProcessException {
    enterBatchProcessComplete();
    try {
View Full Code Here

Examples of org.apache.uima.collection.CasConsumer.reconfigure()

      consumer.setConfigParameterValue("AnnotationTypes", AnnotationTypes);

      consumer.setConfigParameterValue("outputFile", testFile.getAbsolutePath());

      consumer.reconfigure();

      consumer.processCas(cas);
      consumer.destroy();

      boolean isIdentic = FileCompare.compare(refFile, testFile);
View Full Code Here

Examples of org.apache.uima.collection.CasConsumer.reconfigure()

         consumer.setConfigParameterValue("AnnotationTypes", AnnotationTypes);

         consumer.setConfigParameterValue("outputFile", testFile
               .getAbsolutePath());

         consumer.reconfigure();

         consumer.processCas(cas);
         consumer.destroy();

         // check file output
View Full Code Here

Examples of org.apache.uima.resource.ConfigurableResource.reconfigure()

    // call this method recursively on each component
    Map<String, AnalysisEngine> components = this._getASB().getComponentAnalysisEngines();
    Iterator<AnalysisEngine> it = components.values().iterator();
    while (it.hasNext()) {
      ConfigurableResource component = (ConfigurableResource) it.next();
      component.reconfigure();
    }
    //and the FlowController
    FlowControllerContainer fcc = ((ASB_impl) _getASB()).getFlowControllerContainer();
    fcc.reconfigure();
  }
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.