Examples of SimpleStep


Examples of org.apache.uima.flow.SimpleStep

              .getAnalysisEngineMetaDataMap().get(mSequence[currentStep]);
      if (md.getOperationalProperties().getOutputsNewCASes())
        wasPassedToCasMultiplier = true;

      // now send the CAS to the next AE in sequence.
      return new SimpleStep(mSequence[currentStep++]);
    }
View Full Code Here

Examples of org.apache.uima.flow.SimpleStep

        if (shouldEngineBeCalled == true) {
          // set result spec for current analysis engine
          node.setResultSpec(currentAnalysisResultSpec);

          // return current analysis engine node
          return new SimpleStep(node.getCasProcessorKey());
        } else // no engine left which can be called
        {
          return new FinalStep();
        }
      }
    } else if (mFlowTable != null) {
      AnalysisSequenceCapabilityNode node = null;

      // check if document language is included in the flowTable
      List flow = (List) mFlowTable.get(documentLanguage);

      if (flow == null) // try to get flow without language extension or with x-unspecified
      {
        // strip language extension if available
        int index = documentLanguage.indexOf(LANGUAGE_SEPARATOR);

        // if country extension is available
        if (index >= 0) {
          // check if document language is included in the flowTable
          flow = (List) mFlowTable.get(documentLanguage.substring(0, index));
          // If the language was not found, use flow for unspecified lang instead.
          if (flow == null) {
            flow = (List) mFlowTable.get(UNSPECIFIED_LANGUAGE);
          }
        } else // try to get flow for language x-unspecified
        {
          flow = (List) mFlowTable.get(UNSPECIFIED_LANGUAGE);
        }
      }

      // if flow is available get next node
      if (flow != null) {
        if (flow.size() > mIndex) {
          node = (AnalysisSequenceCapabilityNode) flow.get(mIndex++);
          while (node == null && flow.size() > mIndex) {
            node = (AnalysisSequenceCapabilityNode) flow.get(mIndex++);
          }
        }
      }
      if (node != null) {
        return new SimpleStep(node.getCasProcessorKey());
      }
    }
    return new FinalStep();
  }
View Full Code Here

Examples of org.apache.uima.flow.SimpleStep

      if (wasSegmented) {
        return new FinalStep();
      }

      // otherwise, we just send the CAS to the next AE in sequence.
      return new SimpleStep(mSequence[currentStep++]);
    }
View Full Code Here

Examples of org.apache.uima.flow.SimpleStep

          if (satisfied) {
            mAlreadyCalled.add(aeKey);
            if (mLogger.isLoggable(Level.FINEST)) {
              getContext().getLogger().log(Level.FINEST, "Next AE is: " + aeKey);
            }
            return new SimpleStep(aeKey);
          }
        }
      }
      // no appropriate AEs to call - end of flow
      getContext().getLogger().log(Level.FINEST, "Flow Complete.");
View Full Code Here

Examples of org.apache.uima.flow.SimpleStep

    String[] flow = (String[])aContext.getConfigParameterValue(PARAM_FLOW);
    mSequence = new ArrayList();
    for (int i = 0; i < flow.length; i++) {
      String[] aes = flow[i].split(",");
      if (aes.length == 1) {
        mSequence.add(new SimpleStep(aes[0]));
      } else {
        Collection keys = new ArrayList();
        keys.addAll(Arrays.asList(aes));
        mSequence.add(new ParallelStep(keys));
      }           
View Full Code Here

Examples of org.apache.uima.flow.SimpleStep

          if (satisfied) {
            mAlreadyCalled.add(componentInfo.key);
            if (mLogger.isLoggable(Level.FINEST)) {
              getContext().getLogger().log(Level.FINEST, "Next AE is: " + componentInfo.key);
            }
            return new SimpleStep(componentInfo.key);
          }
        }
      }
      // no appropriate AEs to call - end of flow
      getContext().getLogger().log(Level.FINEST, "Flow Complete.");
View Full Code Here

Examples of org.apache.uima.flow.SimpleStep

              .getAnalysisEngineMetaDataMap().get(mSequence.get(currentStep));
      if (md.getOperationalProperties().getOutputsNewCASes())
        wasPassedToCasMultiplier = true;

      // now send the CAS to the next AE in sequence.
      return new SimpleStep((String)mSequence.get(currentStep++));
    }
View Full Code Here

Examples of org.apache.uima.flow.SimpleStep

      if (wasSegmented) {
        return new FinalStep(internallyCreatedCas);
      }

      // otherwise, we just send the CAS to the next AE in sequence.
      return new SimpleStep(mSequence[currentStep++]);
    }
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.