Package h

Class expand_template

java.lang.Object
jason.asSemantics.DefaultInternalAction
h.expand_template
All Implemented Interfaces:
jason.asSemantics.InternalAction, Serializable

public class expand_template extends jason.asSemantics.DefaultInternalAction
expand_template(Tpl, [kv(Var1, Val1), kv(Var2, Val2), ...], URI) is true if URI is the result of expanding Tpl, a URI template, with the mapping provided in the second argument. This mapping should be a list of key-value pairs of the form kv(Var, Val), which maps variable Var to term Val, interpreted as a string. For instance, after executing the following action:
expand_template("http://example.org/{id}{?ts,user}", [kv(id, res123), kv(user, alice), ...], URI)
URI unifies with "http://example.org/res123?user=alice" (and the missing variable mapping for ts is ignored).
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    execute(jason.asSemantics.TransitionSystem ts, jason.asSemantics.Unifier un, jason.asSyntax.Term[] args)
     

    Methods inherited from class jason.asSemantics.DefaultInternalAction

    canBeUsedInContext, checkArguments, destroy, getMaxArgs, getMinArgs, prepareArguments, suspendIntention

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • expand_template

      public expand_template()
  • Method Details

    • execute

      public Object execute(jason.asSemantics.TransitionSystem ts, jason.asSemantics.Unifier un, jason.asSyntax.Term[] args) throws Exception
      Specified by:
      execute in interface jason.asSemantics.InternalAction
      Overrides:
      execute in class jason.asSemantics.DefaultInternalAction
      Throws:
      Exception