Package edu.neu.ccs.task

Examples of edu.neu.ccs.task.Slot


    for (Map.Entry<String, String> e : topInputs.entrySet())
      topTask.setSlotValueScript(e.getKey(), e.getValue(), "init agent");
   
    if ( ! user.isGuest()) {
      int userId = user.getId();
      Slot userSlot = topTask.getType().getSlotIfExists("user");
      if ((userSlot != null) && userSlot.isInput() && !topInputs.containsKey("user")) {
        if (userSlot.getType().equals("string"))
          topTask.setSlotValue("user", Integer.toString(userId));
        else if (userSlot.getType().equals("number"))
          topTask.setSlotValue("user", userId);
      }
    }
   
    Slot lastConvSlot = topTask.getType().getSlotIfExists("lastConversation");
    if ((lastConvSlot != null) &&
      lastConvSlot.isInput() &&
      lastConvSlot.getType().equals("number") &&
      !topInputs.containsKey("lastConversation")) {
     
      Conversation c = user.getLastConversation(id);
      topTask.setSlotValue("lastConversation", c==null ? null : c.getStart());
    }
View Full Code Here


    }
   
    String exitUrl = null;
    Plan top = agent.getTop();
    Task topTask = top.getThisTask();
    Slot exitUrlSlot = topTask.getType().getSlotIfExists("exitUrl");
    if ((exitUrlSlot != null) &&
      exitUrlSlot.isOutput() &&
      "string".equals(exitUrlSlot.getType()) &&
      topTask.isDefinedSlot("exitUrl")) {
      Object exitUrlObj = topTask.getSlotValue("exitUrl");
      if (exitUrlObj != null)
        exitUrl = exitUrlObj.toString();
    }
View Full Code Here

   
    for (Map.Entry<String, String> e : topInputs.entrySet())
      topTask.setSlotValueScript(e.getKey(), e.getValue(), "init agent");
   
    if (user != null) {
      Slot userSlot = topTask.getType().getSlotIfExists("user");
      if ((userSlot != null) &&
        userSlot.isInput() &&
        userSlot.getType().equals("string") &&
        !topInputs.containsKey("user"))
        topTask.setSlotValue("user", user);
    }
   
    if (Bool.isFalse(topTask.isApplicable()))
View Full Code Here

    return slot;
  }
 
  boolean check(TaskModelSet e, String pname, TaskType tt, List<String> errs) {
    String sname = getDestination();
    Slot s = tt.getSlotIfExists(sname);
    if (s == null) {
      errs.add(pname + ": unknown slot " + sname);
      return false;
    } else if ( ! s.isOutput()) {
      errs.add(pname + ": " + sname + " is not an output");
      return false;
    } else
      return true;
   
View Full Code Here

TOP

Related Classes of edu.neu.ccs.task.Slot

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.