ubiware.core.commands
Class AddBeliefsN3Command

java.lang.Object
  extended by ubiware.core.commands.AddBeliefsN3Command
All Implemented Interfaces:
UbiwareAgentCommand<java.lang.Boolean>

public class AddBeliefsN3Command
extends java.lang.Object
implements UbiwareAgentCommand<java.lang.Boolean>

Command that adds a belief in N3 notation to the agent.

Author:
Michael Cochez for UBIWARE project
See Also:
15.3.2010

Constructor Summary
AddBeliefsN3Command(ubiware.util.saplbuilder.SaplDocument document)
          Make a command with the document which will be passed to UbiwareAgent.addBeliefsN3(String) when this command gets executed.
 
Method Summary
 java.lang.Boolean getResult()
          Get the result of the action performed.
 void performCommand(UbiwareAgent agent)
          The code which will get executed by the agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddBeliefsN3Command

public AddBeliefsN3Command(ubiware.util.saplbuilder.SaplDocument document)
Make a command with the document which will be passed to UbiwareAgent.addBeliefsN3(String) when this command gets executed.

Parameters:
document - The document containing the S-APL which should be added to the agent's beliefs.
Method Detail

performCommand

public void performCommand(UbiwareAgent agent)
Description copied from interface: UbiwareAgentCommand
The code which will get executed by the agent.

Specified by:
performCommand in interface UbiwareAgentCommand<java.lang.Boolean>
Parameters:
agent - The agent which is executing the command

getResult

public java.lang.Boolean getResult()
Description copied from interface: UbiwareAgentCommand
Get the result of the action performed. If the UbiwareAgentCommand.performCommand(UbiwareAgent) has not been executed, the behavior of this method is undefined.

Specified by:
getResult in interface UbiwareAgentCommand<java.lang.Boolean>
Returns:
The result of the performed action