Examples of IFlow


Examples of org.speakright.core.IFlow

    return path;
  }
  IFlow read(String path)
  {
//    return new TrailWrapper(new MyFlow("a"));
    IFlow flow = null;
    try
    {
    ObjectInputStream in = new ObjectInputStream( new FileInputStream(path));
    flow = (IFlow)in.readObject();
    in.close();
View Full Code Here

Examples of org.speakright.core.IFlow

  /**
   * Do the branching, as determined by branch()
   */
  @Override
  public IFlow getFirst(IFlowContext context) {
    IFlow flow = branch();
    return flow;
  }
View Full Code Here

Examples of org.speakright.core.IFlow

  @Override
  public IFlow onCatch(IFlow current, SRResults results, String eventName, ThrowEvent event)
  {
    //return new ExitFlowEvent();
    //catch all and ignore, and continue
    IFlow flow = getNext(current, results);
    if (flow == null) {
      flow = new ExitEvent();
    }
    return flow;
  }
View Full Code Here

Examples of org.speakright.core.IFlow

    return super.getFirst(context);
  }
 
  @Override
  public IFlow getSubFlowAfter(IFlow subFlow) {
    IFlow flow = super.getSubFlowAfter(subFlow);
    if (flow != null) { //are skipping a sub-flow?
      m_n--;
//      log("n reduced to " + m_n);
    }
    else {
View Full Code Here

Examples of org.speakright.core.IFlow

    if (m_count >= m_n) {
      this.log(String.format("loop %d/%d finished", m_count, m_n));
      return null;
    }
    else {
      IFlow flow = super.getNext(current, results);
      if (flow == null) {
        this.log(String.format("loop %d/%d again", m_count, m_n));
        return getFirst(results); //loop again
      }
      return flow;
View Full Code Here

Examples of org.speakright.core.IFlow

      log("grampipeline: bindings " + bindingL.size());
    }
    for(ModelBindingSpec spec : bindingL) {
      IModelBinder binder = m_rcontext.m_binder;

      IFlow flow = m_rcontext.m_flow;
      if (flow instanceof ITransparentFlowWrapper) {
        ITransparentFlowWrapper wrap = (ITransparentFlowWrapper)flow;
        flow = wrap.innerFlow();
      }
     
View Full Code Here

Examples of org.speakright.core.IFlow

  }
 
  void doCalculate(Prompt prompt, RenderContext rcontext, boolean onceEver)
  {
    String text = prompt.ptext();
    IFlow flow = rcontext.m_flow;
    if (rcontext.m_playOnceTracker.find(flow, text) != null) {
      m_value = false;
    }
    else
    {
View Full Code Here

Examples of org.speakright.core.IFlow

   * Invokes getWelcome, getMainLoop, and getGoodbye.
   * If you override this method you MUST call super.OnBegin
   */
  @Override
  public void onBegin(IFlowContext context) {
    IFlow flow = createWelcome();
    if (flow != null) {
      add(flow);
    }
    m_mainLoop = createMainLoop();
    if (m_mainLoop != null) {
View Full Code Here

Examples of org.speakright.core.IFlow

      return -1;
    }
    else {
      int n = m_L.size();
      for(int i = 0; i < n; i++) {
        IFlow flow = m_L.get(i);
        if (subFlow == flow) {
          return i;
        }
      }
      return -1;
View Full Code Here

Examples of org.speakright.core.IFlow

  /**
   * Returns the flow for the choice that matches the user input.
   */
  @Override public IFlow getNext(IFlow current, SRResults results)
  {
    IFlow flow = m_map.find(results.m_input);
    if (flow != null)  {
      return flow;
    }
    return m_choiceQuestion;
  }
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.