vs.rationalagent
Class RationalAgent

java.lang.Object
  extended by jade.core.Agent
      extended by jade.gui.GuiAgent
          extended by vs.rationalagent.RationalAgent
All Implemented Interfaces:
jade.core.TimerListener, java.io.Serializable, java.lang.Runnable, IAgent, IRationalAgent
Direct Known Subclasses:
BasicCharacterAgent, BasicPlotAgent, BasicWorldAgent

public abstract class RationalAgent
extends jade.gui.GuiAgent
implements IRationalAgent

A JADE-Agent with OWL reasoning capabilities.

Author:
Robert de Groote, Ivo Swartjes
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.Agent
jade.core.Agent.Interrupted
 
Field Summary
static java.lang.String CHARACTER_SERVICE
           
static int CLEAR_KB
           
static int CONSULT
           
static int EXIT
           
static int LOAD_KB
           
static java.lang.String PLOT_SERVICE
           
static java.lang.String PROLOG_FILE
           
static int QUERY_KB
           
static int SAVE_KB
           
static int TEST_KB
           
static java.lang.String TRACER_SERVICE
          Descriptions of services for agents to provide
static java.lang.String WORLD_SERVICE
           
 
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN
 
Constructor Summary
RationalAgent()
           
 
Method Summary
 void addEventListener(StoryAgentEventListener listener)
           
 jade.core.AID[] findServiceType(java.lang.String type)
          Searches the JADE platform for services of the given type
 void fireEvent(StoryAgentEvent e)
           
 java.lang.String genCID()
          Generates a unique conversation ID See http://www.iro.umontreal.ca/~vaucher/Agents/Jade/primer6.html
 jade.core.Agent getAgent()
          Get the agent itself
 jade.content.lang.Codec getCodec()
           
 PrologKB getKnowledgeManager()
          Retrieve the knowledge manager
 jade.content.onto.Ontology getOntology()
           
 jade.core.AID getSniffer()
          Deprecated.  
 StoryDomain getStoryDomain()
           
 jade.core.AID getTracer()
          Deprecated.  
 void removeEventListener(StoryAgentEventListener listener)
           
 void setTracer(jade.core.AID tracer)
          Deprecated.  
 void setup()
          Initializes the agent.
 void takeDown()
          overrides jade.core.Agent.takeDown
 void trace(int verbosity, int depth, java.lang.String message)
          Deprecated.  
 void trace(int verbosity, java.lang.String message)
          Deprecated.  
 void writeConsole(java.lang.String message)
           
 void writeGui(java.lang.String msg)
           
 
Methods inherited from class jade.gui.GuiAgent
postGuiEvent
 
Methods inherited from class jade.core.Agent
addBehaviour, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAMS, getArguments, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getProperty, getQueueSize, getState, here, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, removeBehaviour, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setQueueSize, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface vs.rationalagent.IRationalAgent
getTime
 
Methods inherited from interface vs.IAgent
getLocalName
 

Field Detail

CHARACTER_SERVICE

public static java.lang.String CHARACTER_SERVICE

PLOT_SERVICE

public static java.lang.String PLOT_SERVICE

WORLD_SERVICE

public static java.lang.String WORLD_SERVICE

TRACER_SERVICE

public static java.lang.String TRACER_SERVICE
Descriptions of services for agents to provide


PROLOG_FILE

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

EXIT

public static final int EXIT
See Also:
Constant Field Values

LOAD_KB

public static final int LOAD_KB
See Also:
Constant Field Values

SAVE_KB

public static final int SAVE_KB
See Also:
Constant Field Values

CLEAR_KB

public static final int CLEAR_KB
See Also:
Constant Field Values

CONSULT

public static final int CONSULT
See Also:
Constant Field Values

QUERY_KB

public static final int QUERY_KB
See Also:
Constant Field Values

TEST_KB

public static final int TEST_KB
See Also:
Constant Field Values
Constructor Detail

RationalAgent

public RationalAgent()
Method Detail

addEventListener

public void addEventListener(StoryAgentEventListener listener)
Specified by:
addEventListener in interface IAgent

findServiceType

public jade.core.AID[] findServiceType(java.lang.String type)
Description copied from interface: IAgent
Searches the JADE platform for services of the given type

Specified by:
findServiceType in interface IAgent
Returns:
A list of all agents offering this service.

fireEvent

public void fireEvent(StoryAgentEvent e)
Specified by:
fireEvent in interface IAgent

genCID

public java.lang.String genCID()
Description copied from interface: IAgent
Generates a unique conversation ID See http://www.iro.umontreal.ca/~vaucher/Agents/Jade/primer6.html

Specified by:
genCID in interface IAgent
Returns:
a unique conversation ID

getAgent

public jade.core.Agent getAgent()
Description copied from interface: IAgent
Get the agent itself

Specified by:
getAgent in interface IAgent

getCodec

public jade.content.lang.Codec getCodec()
Specified by:
getCodec in interface IAgent
Returns:
The (@link Codec) used by this agent

getKnowledgeManager

public PrologKB getKnowledgeManager()
Description copied from interface: IRationalAgent
Retrieve the knowledge manager

Specified by:
getKnowledgeManager in interface IRationalAgent

getOntology

public jade.content.onto.Ontology getOntology()
Specified by:
getOntology in interface IAgent
Returns:
The (@link Ontology) used by this agent

getSniffer

@Deprecated
public jade.core.AID getSniffer()
Deprecated. 


getStoryDomain

public StoryDomain getStoryDomain()

getTracer

@Deprecated
public jade.core.AID getTracer()
Deprecated. 

Description copied from interface: IAgent
Getter for Tracer agent

Specified by:
getTracer in interface IAgent
Returns:
AID of Tracer agent

removeEventListener

public void removeEventListener(StoryAgentEventListener listener)
Specified by:
removeEventListener in interface IAgent

setTracer

@Deprecated
public void setTracer(jade.core.AID tracer)
Deprecated. 

Description copied from interface: IAgent
Setter for Tracer agent

Specified by:
setTracer in interface IAgent
Parameters:
tracer - AID of Tracer agent

setup

public void setup()
Initializes the agent. Registers codec and ontology used by the agent, Tries to hook up with the (@link TracerAgent), and sets up a reasoning context for reasoning with OWL. overrides jade.core.Agent.setup

Overrides:
setup in class jade.core.Agent

takeDown

public void takeDown()
overrides jade.core.Agent.takeDown

Overrides:
takeDown in class jade.core.Agent

trace

@Deprecated
public void trace(int verbosity,
                             int depth,
                             java.lang.String message)
Deprecated. 

Description copied from interface: IAgent
Send a message to the Tracer agent if the tracer-service has been found in the yellow pages.

Specified by:
trace in interface IAgent
Parameters:
verbosity - the importance of the message
message - the message itself

trace

@Deprecated
public void trace(int verbosity,
                             java.lang.String message)
Deprecated. 

Sends a message to the TracerAgent if the tracer-service has been found in the yellow pages.

Specified by:
trace in interface IAgent

writeConsole

public void writeConsole(java.lang.String message)

writeGui

public void writeGui(java.lang.String msg)
Specified by:
writeGui in interface IRationalAgent