zeus.rete.action
Class ReteAction

java.lang.Object
  extended byzeus.rete.action.ReteAction
All Implemented Interfaces:
BasicAction
Direct Known Subclasses:
AchieveAction, AssertAction, BindAction, BuyAction, CallAction, CloseAction, ExecuteAction, IfAction, MessageAction, ModifyAction, OpenAction, PrintAction, PrintlnAction, ReadAction, ReadlnAction, RetractAction, SellAction, SystemAction, WhileAction

public abstract class ReteAction
extends java.lang.Object
implements BasicAction

superclass of the class that is called by all the ReteEngine handlers. There is one abstract method here - executeAction (Action,Info) that needs to be implemented

Since:
1.1
Author:
Simon Thompson

Field Summary
protected  ConflictSet conflictHandler
          conflictHandler is the reference to the zeus.rete.ConflictHandler object which (I think) decides which rule or action to fire next
protected  AgentContext context
          context is stored by the superclass constructor for access by inhereted classes
protected  ReteEngine engine
          engine is the reference to the ReteEngine, in some uses of the zeus.ReteEngine it is anticipated that no agent will be present
protected  OntologyDb ontologyDb
          ontologyDb is the reference to the ontology we are working in, again, this package protected slot is provided because we need to remember to use case for Rete where it is not in an agent persay.
 
Constructor Summary
ReteAction()
           
 
Method Summary
abstract  void executeAction(Action a, Info info)
          executeAction is a abstract method to be defined by implementing classes.
 OntologyDb getOntologyDb()
          return the ontology ref, if the ontologyDb slot is null then get the current agent ontology, otherwise get the current ontology Issues:
------
If the context object and the rete object are both null should this then throw an exception - nice, but makes harder to use...
 java.lang.String getServiceDescription(java.lang.String language)
          instantiated to return false, override this to produce service descriptions for rules
 void setActuators(ConflictSet conflictHandler, AgentContext context)
          this method is used to provide the Action objects with "actuators", by which I mean some object references that allow the Action implementor to actually do something that effects the state of the agent
 void setActuators(ConflictSet conflictHandler, ReteEngine engine)
          this method is used to provide the Action objects with "actuators", by which I mean some object references that allow the Action implementor to actually do something.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected AgentContext context
context is stored by the superclass constructor for access by inhereted classes


engine

protected ReteEngine engine
engine is the reference to the ReteEngine, in some uses of the zeus.ReteEngine it is anticipated that no agent will be present


conflictHandler

protected ConflictSet conflictHandler
conflictHandler is the reference to the zeus.rete.ConflictHandler object which (I think) decides which rule or action to fire next


ontologyDb

protected OntologyDb ontologyDb
ontologyDb is the reference to the ontology we are working in, again, this package protected slot is provided because we need to remember to use case for Rete where it is not in an agent persay.

See Also:
getOntology()
Constructor Detail

ReteAction

public ReteAction()
Method Detail

setActuators

public void setActuators(ConflictSet conflictHandler,
                         AgentContext context)
this method is used to provide the Action objects with "actuators", by which I mean some object references that allow the Action implementor to actually do something that effects the state of the agent

Specified by:
setActuators in interface BasicAction
Parameters:
context - - our old friend the AgentContext interface gives us a reference to the class which is implementing the agent's body.
conflictHandler - - reference to the ConflictSet object
Since:
1.1

setActuators

public void setActuators(ConflictSet conflictHandler,
                         ReteEngine engine)
this method is used to provide the Action objects with "actuators", by which I mean some object references that allow the Action implementor to actually do something. In this case we are being called from a context that has a null context - so no agent, but a ReteEngine instead.

Specified by:
setActuators in interface BasicAction
Parameters:
engine - - the ReteEngine that we are using
conflictHandler - - reference to the ConflictSet object
Since:
1.1

getOntologyDb

public OntologyDb getOntologyDb()
return the ontology ref, if the ontologyDb slot is null then get the current agent ontology, otherwise get the current ontology

Issues:
------
If the context object and the rete object are both null should this then throw an exception - nice, but makes harder to use...

Specified by:
getOntologyDb in interface BasicAction

executeAction

public abstract void executeAction(Action a,
                                   Info info)
executeAction is a abstract method to be defined by implementing classes.

This method will be called when the rete algorithm decides that this is the right action to fire right now.

Specified by:
executeAction in interface BasicAction

getServiceDescription

public java.lang.String getServiceDescription(java.lang.String language)
instantiated to return false, override this to produce service descriptions for rules

Specified by:
getServiceDescription in interface BasicAction


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.