Examples of collectionProcessComplete()


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

      if (cr.hasNext()) { // assumes just one document to process
        cr.getNext(cas);
        engine.process(cas); // SimplePipeline.runPipeline(cas, engine);
      }

      engine.collectionProcessComplete();

      return cas.getJCas();

    } catch (ResourceInitializationException e) {
      throw new RuntimeException(e);
View Full Code Here

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

    List<File> inputFiles = getFiles(inputFolder, inputRecursive);
    for (File file : inputFiles) {
      processFile(file, ae, cas);
    }

    ae.collectionProcessComplete(new ProcessTrace_impl());
    cas.release();
    ae.destroy();
  }

  private static void processFile(File file, AnalysisEngine ae, CAS cas) throws IOException,
View Full Code Here

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

        AnalysisEngine ae = (AnalysisEngine) mPool.getResource(0); // wait forever

        // store AE instance on List to be released later
        toRelease.add(ae);

        ae.collectionProcessComplete();
      }
    } finally {
      // release all AnalysisEngines back to pool
      Iterator it = toRelease.iterator();
      while (it.hasNext()) {
View Full Code Here

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

    long start = super.getCpuTime();
    localCache.dumpContents();
    try {
      ae = aeInstancePool.checkout();
      if (ae != null) {
        ae.collectionProcessComplete();
      }
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, getClass().getName(),
                "collectionProcessComplete", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                "UIMAEE_cpc_all_cases_processed__FINEST", new Object[] { getComponentName() });
View Full Code Here

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

     
      //test that fixedFlow order is used
      File descFile = JUnitExtension.getFile("TextAnalysisEngineImplTest/AggregateForCollectionProcessCompleteTest.xml");
      AnalysisEngineDescription cpcTestDesc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(new XMLInputSource(descFile));
      AnalysisEngine cpcTestAe = UIMAFramework.produceAnalysisEngine(cpcTestDesc);
      cpcTestAe.collectionProcessComplete();
      assertEquals("One", AnnotatorForCollectionProcessCompleteTest.lastValue);
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
  }
View Full Code Here

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

      // If there's a CAS Consumer inside this aggregate and we want
      // it's collectionProcessComplete method to be called, we need to
      // call it ourselves. If run inside a CPE this would get called
      // automatically.
      ae.collectionProcessComplete();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}
View Full Code Here

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

      }
      //call components in the order specified in the flow
      if (orderedNodes != null) {
        for (int i = 0; i < orderedNodes.length; i++) {
          AnalysisEngine component = (AnalysisEngine)components.remove(orderedNodes[i])
          component.collectionProcessComplete();
        }
      }
      //now call reamining components in arbitrary order
      Iterator iter = components.values().iterator();
      while (iter.hasNext()) {
View Full Code Here

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

        AnalysisEngine ae = (AnalysisEngine) mPool.getResource(0); // wait forever

        // store AE instance on List to be released later
        toRelease.add(ae);

        ae.collectionProcessComplete();
      }
    } finally {
      // release all AnalysisEngines back to pool
      Iterator it = toRelease.iterator();
      while (it.hasNext()) {
View Full Code Here

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

     
      //test that fixedFlow order is used
      File descFile = JUnitExtension.getFile("TextAnalysisEngineImplTest/AggregateForCollectionProcessCompleteTest.xml");
      AnalysisEngineDescription cpcTestDesc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(new XMLInputSource(descFile));
      AnalysisEngine cpcTestAe = UIMAFramework.produceAnalysisEngine(cpcTestDesc);
      cpcTestAe.collectionProcessComplete();
      assertEquals("One", AnnotatorForCollectionProcessCompleteTest.lastValue);
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
  }
View Full Code Here

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

        aae.process(cas);
        cas.reset();
      }

      // Signal end of processing
      aae.collectionProcessComplete();
    } finally {
      // Destroy
      aae.destroy();
    }
  }
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.