Package org.apache.uima.flow

Examples of org.apache.uima.flow.Step


    return endpoint;
  }

  private void executeFlowStep(FlowContainer aFlow, String aCasReferenceId, boolean newCAS)
          throws AsynchAEException {
    Step step = null;
    try {
      //  Guard a call to next(). Allow one thread and block the rest
      synchronized( flowControllerContainer ) {
        step = aFlow.next();
      }
View Full Code Here


      if (currentStep >= mSequence.size()) {
        return new FinalStep(); // this CAS has finished the sequence
      }

      // if next step is a CasMultiplier, set wasPassedToCasMultiplier to true for next time
      Step nextStep = (Step) mSequence.get(currentStep++);
      if (stepContainsCasMultiplier(nextStep)) {
        wasPassedToCasMultiplier = true;
      }

      // now send the CAS to the next AE(s) in sequence.
View Full Code Here

   */
  public void removeAnalysisEngines(Collection aKeys) throws AnalysisEngineProcessException {
    // Remove keys from Sequence
    int i = 0;
    while (i < mSequence.size()) {
      Step step = (Step) mSequence.get(i);
      if (step instanceof SimpleStep && aKeys.contains(((SimpleStep) step).getAnalysisEngineKey())) {
        mSequence.remove(i);
      } else if (step instanceof ParallelStep) {
        Collection keys = new ArrayList(((ParallelStep) step).getAnalysisEngineKeys());
        keys.removeAll(aKeys);
View Full Code Here

      if (currentStep >= mSequence.size()) {
        return new FinalStep(); // this CAS has finished the sequence
      }

      // if next step is a CasMultiplier, set wasPassedToCasMultiplier to true for next time
      Step nextStep = (Step) mSequence.get(currentStep++);
      if (stepContainsCasMultiplier(nextStep))
        wasPassedToCasMultiplier = true;

      // now send the CAS to the next AE(s) in sequence.
      return nextStep;
View Full Code Here

   * @see org.apache.uima.flow.FlowController_ImplBase#removeAnalysisEngines(java.util.Collection)
   */
  public void removeAnalysisEngines(Collection aKeys) throws AnalysisEngineProcessException {
    // Remove keys from Sequence
    for (int i = 0; i < mSequence.size(); ++i) {
      Step step = (Step) mSequence.get(i);
      if (step instanceof SimpleStep && aKeys.contains(((SimpleStep) step).getAnalysisEngineKey())) {
        mSequence.set(i, null);
      } else if (step instanceof ParallelStep) {
        Collection keys = new ArrayList(((ParallelStep) step).getAnalysisEngineKeys());
        keys.removeAll(aKeys);
View Full Code Here

        wasPassedToCasMultiplier = false;
        casMultiplierProducedNewCas = false;
      }

      // Get next in sequence, skipping any disabled ones
      Step nextStep;
      do {
        if (currentStep >= mSequence.size()) {
          mLogger.log(Level.FINE, "CAS " + flowId + " at end of flow");
          return new FinalStep(); // this CAS has finished the sequence
        }
View Full Code Here

      throw new AnalysisEngineProcessException();
    }
    // Remove keys from Sequence
    int i = 0;
    while (i < mSequence.size()) {
      Step step = (Step) mSequence.get(i);
      if (step instanceof SimpleStep && aKeys.contains(((SimpleStep) step).getAnalysisEngineKey())) {
        mSequence.remove(i);
      } else if (step instanceof ParallelStep) {
        Collection keys = new ArrayList(((ParallelStep) step).getAnalysisEngineKeys());
        keys.removeAll(aKeys);
View Full Code Here

    return endpoint;
  }

  private void executeFlowStep(FlowContainer aFlow, String aCasReferenceId, boolean newCAS)
          throws AsynchAEException {
    Step step = null;
    try {
      //  Guard a call to next(). Allow one thread and block the rest
      synchronized( flowControllerContainer ) {
        step = aFlow.next();
      }
View Full Code Here

      }
    }
  }
  private void executeFlowStep(FlowContainer aFlow, String aCasReferenceId, boolean newCAS) throws AsynchAEException
  {
    Step step = null;
    try
    {
      step = aFlow.next();
    }
    catch( Exception e)
View Full Code Here

      throw new AnalysisEngineProcessException();
    }
    //Remove keys from Sequence
    int i = 0;
    while (i < mSequence.size()) {
      Step step = (Step)mSequence.get(i);
      if (step instanceof SimpleStep && aKeys.contains(((SimpleStep)step).getAnalysisEngineKey())) {
        mSequence.remove(i);
      }
      else if (step instanceof ParallelStep) {
        Collection keys = new ArrayList(((ParallelStep)step).getAnalysisEngineKeys());
View Full Code Here

TOP

Related Classes of org.apache.uima.flow.Step

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.