org.hops.dm.tad
Class dm_util

java.lang.Object
  extended by org.hops.dm.tad.dm_util
All Implemented Interfaces:
java.io.Serializable

public class dm_util
extends java.lang.Object
implements java.io.Serializable

Dialogue Manager speicific util methods

Version:
3.0
Author:
Meritxell Gonzalez
See Also:
Serialized Form

Field Summary
static java.lang.String FOCUS
           
static java.lang.String REQUEST
           
 
Constructor Summary
dm_util()
           
 
Method Summary
static void ActualizePlan(IS is, plan genPlan, plan subplan, attrval curProp)
          for all the actions in the subplan - if the action is still in the plan -> if the condition is not valid remove it - if the action is not in the plan -> if the condition is valid and it has not been still solved then push it
static void addAll(java.util.HashMap hm, attrval attr)
          funció addAll per al hashmap
static boolean containsIgnoreCase(java.util.ArrayList list, java.lang.Object str)
          Check if the str is in the list ignoring the case of the values in the list
static boolean execute_subaction(IS actualstate)
          rule execute_subaction class exec_plan pre fst(/private/plan, subaction(Q)) domain::subaction(Q,subaction) eff pop(/private/plan) add(private/Plan,subaction)
static java.util.HashMap ExtractFocusValues(stackp commitments, stackp believes)
          function for collecting the queryfocus values for the BE get the queryfocus, title, date, price, location, channelname s'hauria de canviar la funció i fer-la més general
static stackp join(stackp in)
          put just one attrval with the list of values
static boolean MatchCondition(attrval qud, condition[] cond)
          any of the conds accomplish qud
static boolean MatchCondition(attrval qud, term t)
          true if the condition is accomplished
static boolean MatchCondition(IS is, condition[] cond)
          at leat one of the condition may be true
static void removeCondition(IS is, condition[] cond)
          remove all the conditions
static void removeSubaction(IS actualstate, action subaction)
          actualize the plan. remove the subaction moves and set the subaction move again
static void restorePM(IS is)
          restores the PM moves to the PLAN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOCUS

public static final java.lang.String FOCUS
See Also:
Constant Field Values

REQUEST

public static final java.lang.String REQUEST
See Also:
Constant Field Values
Constructor Detail

dm_util

public dm_util()
Method Detail

MatchCondition

public static boolean MatchCondition(IS is,
                                     condition[] cond)
at leat one of the condition may be true


MatchCondition

public static boolean MatchCondition(attrval qud,
                                     condition[] cond)
any of the conds accomplish qud


MatchCondition

public static boolean MatchCondition(attrval qud,
                                     term t)
true if the condition is accomplished


removeCondition

public static void removeCondition(IS is,
                                   condition[] cond)
remove all the conditions


ActualizePlan

public static void ActualizePlan(IS is,
                                 plan genPlan,
                                 plan subplan,
                                 attrval curProp)
for all the actions in the subplan - if the action is still in the plan -> if the condition is not valid remove it - if the action is not in the plan -> if the condition is valid and it has not been still solved then push it


execute_subaction

public static boolean execute_subaction(IS actualstate)
rule execute_subaction class exec_plan pre fst(/private/plan, subaction(Q)) domain::subaction(Q,subaction) eff pop(/private/plan) add(private/Plan,subaction)


removeSubaction

public static void removeSubaction(IS actualstate,
                                   action subaction)
actualize the plan. remove the subaction moves and set the subaction move again


containsIgnoreCase

public static boolean containsIgnoreCase(java.util.ArrayList list,
                                         java.lang.Object str)
Check if the str is in the list ignoring the case of the values in the list


restorePM

public static void restorePM(IS is)
restores the PM moves to the PLAN


ExtractFocusValues

public static java.util.HashMap ExtractFocusValues(stackp commitments,
                                                   stackp believes)
function for collecting the queryfocus values for the BE get the queryfocus, title, date, price, location, channelname s'hauria de canviar la funció i fer-la més general


addAll

public static void addAll(java.util.HashMap hm,
                          attrval attr)
funció addAll per al hashmap


join

public static stackp join(stackp in)
put just one attrval with the list of values