jason.asSyntax.directives
Class Include

Package class diagram package Include
java.lang.Object
  extended by jason.asSyntax.directives.Include
All Implemented Interfaces:
Directive

public class Include
extends java.lang.Object
implements Directive

Implementation of the include directive.


Field Summary
static java.lang.String CRPrefix
           
 
Constructor Summary
Include()
           
 
Method Summary
static java.lang.String checkPathAndFixWithSourcePath(java.lang.String f, java.util.List<java.lang.String> srcpath, java.lang.String urlPrefix)
          fix path of the asl code based on aslSourcePath, also considers code from a jar file (if urlPrefix is not null)
 Agent process(Pred directive, Agent outerContent, Agent innerContent)
          This method is called to process the directive.
 void setSourcePath(java.util.List<java.lang.String> sp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRPrefix

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

Include

public Include()
Method Detail

process

public Agent process(Pred directive,
                     Agent outerContent,
                     Agent innerContent)
Description copied from interface: Directive
This method is called to process the directive.

Specified by:
process in interface Directive
Parameters:
directive - the directive as defined in the source (e.g. "include("bla.asl")")
outerContent - the representation of the agent where the directive is being processed (the method should not change this agent state)
innerContent - the content (plans, beliefs, ...) inside the begin/end directive (as in goal patterns)
Returns:
the agent (plans, bels, ...) with the result of the directive.

setSourcePath

public void setSourcePath(java.util.List<java.lang.String> sp)

checkPathAndFixWithSourcePath

public static java.lang.String checkPathAndFixWithSourcePath(java.lang.String f,
                                                             java.util.List<java.lang.String> srcpath,
                                                             java.lang.String urlPrefix)
fix path of the asl code based on aslSourcePath, also considers code from a jar file (if urlPrefix is not null)