teamSpace.structure
Class ResultLibrary

java.lang.Object
  extended byteamSpace.structure.ResultLibrary

public class ResultLibrary
extends java.lang.Object

This class represents the results and methods for extracting information about them. The results are actually kept by the Rete rule engine. So this class also serves as an interface to this rule engine.


Constructor Summary
ResultLibrary(Rete ruleEngine)
          The constructor
 
Method Summary
 void add(java.lang.String construct)
          This method add a construct to the rule engine
 boolean addProcessedActions(java.util.ArrayList actions)
          This method adds processed actions to the rule engine.
 boolean addProcessedPSMs(java.util.ArrayList psms)
          This method adds composed PSMs to the rule engine.
 java.util.ArrayList getActionsReadyToExecute()
          This method return a list of the actions that are ready to be executed.
 java.util.ArrayList getComposedPSMs()
          This method returns a list of the composed PSMs.
 java.util.ArrayList getExecutedActions()
          This method return a list of the executed actions.
 java.util.ArrayList getPSMsReadyToCompose()
          This method returns a list of PSMs that are ready to be composed.
 boolean initialize()
          The method initializes the result library by adding templates for how constructs (facts) should be represented in the rule base.
 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

ResultLibrary

public ResultLibrary(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

addProcessedActions

public boolean addProcessedActions(java.util.ArrayList actions)
This method adds processed actions to the rule engine.

Parameters:
actions - The actions to be added, listed as TSAction objects
Returns:
boolean Returns true if all actions are successfully added and false if not

addProcessedPSMs

public boolean addProcessedPSMs(java.util.ArrayList psms)
This method adds composed PSMs to the rule engine.

Parameters:
psms - The PSMs to be added, listed as TSPSM objects
Returns:
boolean Returns true if all PSMs are successfully added and false if not

getExecutedActions

public java.util.ArrayList getExecutedActions()
This method return a list of the executed actions.

Returns:
The list containing TSAction objects

getComposedPSMs

public java.util.ArrayList getComposedPSMs()
This method returns a list of the composed PSMs.

Returns:
The list containing TSPSM objects

getActionsReadyToExecute

public java.util.ArrayList getActionsReadyToExecute()
This method return a list of the actions that are ready to be executed.

Returns:
The list containing TSAction objects

getPSMsReadyToCompose

public java.util.ArrayList getPSMsReadyToCompose()
This method returns a list of PSMs that are ready to be composed.

Returns:
The list containing TSPSM objects

initialize

public boolean initialize()
The method initializes the result library by adding templates for how constructs (facts) should be represented in the rule base.

Returns:
true if the templates are successfully added and false if not