teamSpace.structure
Class RuleBase

java.lang.Object
  extended byteamSpace.structure.RuleBase

public class RuleBase
extends java.lang.Object

This class reprsents the Rule Base of the TEAM SPACE structure and is an interface to the rules in the rule engine.


Constructor Summary
RuleBase(Rete ruleEngine)
          The constructor.
 
Method Summary
 void add(java.lang.String construct)
          This method add a construct to the rule engine
 void executeRules()
          The method executes the rules in the ruleengine
 boolean initialize(PlanLibrary planLib)
          This method starts the initialization process of the rule base
 boolean initializeAction(java.lang.String actionName)
          The method translate information about an action from the tmst into rules used by the rule-engine part of the team-space.
 boolean initializePSM(java.lang.String psmName)
          The method translate information about a psm from the tmst into rules used by the rule-engine part of the team-space.
 boolean initializeTask(java.lang.String taskName)
          The method translate information about a task from the tmst into rules used by the rule-engine part of the team-space.
 void setFileWriter(FileWriter fileWriter)
          This method sets the FileWriter that handles printing the output of the problem solving steps to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleBase

public RuleBase(Rete ruleEngine)
The constructor.

Parameters:
ruleEngine - The rule engine
Method Detail

setFileWriter

public void setFileWriter(FileWriter fileWriter)
This method sets the FileWriter that handles printing the output of the problem solving steps to a file.

Parameters:
fileWriter - Reference to the FileWriter used by all agents working on the problem of one certain TR

add

public void add(java.lang.String construct)
         throws JessException
This method add a construct to the rule engine

Parameters:
construct - The construct to be added
Throws:
JessException

initialize

public boolean initialize(PlanLibrary planLib)
This method starts the initialization process of the rule base

Parameters:
planLib - A link to the plan library

initializeTask

public boolean initializeTask(java.lang.String taskName)
                       throws JessException
The method translate information about a task from the tmst into rules used by the rule-engine part of the team-space.

Parameters:
taskName - - The name of the task
Returns:
Returns true if everything went ok and false if not
Throws:
JessException

initializePSM

public boolean initializePSM(java.lang.String psmName)
                      throws JessException
The method translate information about a psm from the tmst into rules used by the rule-engine part of the team-space.

Parameters:
psmName - - The name of the psm
Returns:
Returns true if everything went ok and false if not
Throws:
JessException

initializeAction

public boolean initializeAction(java.lang.String actionName)
                         throws JessException
The method translate information about an action from the tmst into rules used by the rule-engine part of the team-space.

Parameters:
actionName - - The name of the action
Returns:
Returns true if everything went ok and false if not
Throws:
JessException

executeRules

public void executeRules()
The method executes the rules in the ruleengine