Package org.speakright.core

Examples of org.speakright.core.IModelBinder


    ArrayList<ModelBindingSpec> bindingL = grammar.bindingList();
    if (bindingL.size() > 0) {
      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();
      }
     
      binder.addBinding(flow, spec.m_slotName, spec.m_target);
    }   
   
    String value = grammar.m_gtext;
   
    //step 3. evaluate value items
View Full Code Here


    return null; //it's not an audio item
  }

  String evaluate(String modelVar)
  {
    IModelBinder binder = m_rcontext.m_binder;
    if (binder == null) {
      RenderErrors.logError(m_err, RenderErrors.FlowHasNoModel,
          String.format("Flow without a model used a prompt that referenced model var '%s'. ", modelVar));
      return "";
    }
    String s = binder.getModelValue(modelVar);
    if (s == null) {
      binder.failed(m_err);
      RenderErrors.logError(m_err, RenderErrors.UnknownModelVar,
          String.format("can't find model var '%s'", modelVar));
      s = "";
    }
    else
View Full Code Here

TOP

Related Classes of org.speakright.core.IModelBinder

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.