org.semwebcentral.sweetrules.ruleml
Class SweetActionLauncher

java.lang.Object
  extended byorg.semwebcentral.sweetrules.ruleml.SweetActionLauncher
All Implemented Interfaces:
ISweetActionLauncher

public class SweetActionLauncher
extends java.lang.Object
implements ISweetActionLauncher

Created on Oct 27, 2004 The implementation of the action launcher.

Author:
Shashidhara K Ganjugunte, Dr. Benjamin Grosof, Dr. Said Tabet, Chitravanu Neogy

Constructor Summary
SweetActionLauncher()
           
 
Method Summary
 void launchActions(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.FactType[] facts, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.EffeType[] effectorStatements)
          Launches actions corresponding to the given facts based on the specification in the effector statements
 void launchActions(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RulebaseType ruleBase)
          Launches the actions by extracting the effector statements and facts from the specified Rule base
 void launchActions(java.lang.String ruleMLRulebase)
          Launches the actions by extracting the effector statements and facts from the specified Rule base
private  boolean matches(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CslitType cslit, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.EffeType effectorStatement)
          Checks to see if a given cslit has an effector (atoms are converted to cslits)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SweetActionLauncher

public SweetActionLauncher()
Method Detail

launchActions

public void launchActions(java.lang.String ruleMLRulebase)
                   throws SweetException
Description copied from interface: ISweetActionLauncher
Launches the actions by extracting the effector statements and facts from the specified Rule base

Specified by:
launchActions in interface ISweetActionLauncher
Throws:
SweetException - if an error occurs (e.g. not being able to load the effector class)

launchActions

public void launchActions(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RulebaseType ruleBase)
                   throws SweetException
Description copied from interface: ISweetActionLauncher
Launches the actions by extracting the effector statements and facts from the specified Rule base

Specified by:
launchActions in interface ISweetActionLauncher
Parameters:
ruleBase - The RuleML rule base as a java.lang.Object
Throws:
SweetException - if an error occurs (e.g. not being able to load the effector class)

launchActions

public void launchActions(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.FactType[] facts,
                          org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.EffeType[] effectorStatements)
                   throws SweetException
Description copied from interface: ISweetActionLauncher
Launches actions corresponding to the given facts based on the specification in the effector statements

Specified by:
launchActions in interface ISweetActionLauncher
Parameters:
facts - The facts on which effectors should be launched (If there is no effector associated with a fact, then no action is taken)
effectorStatements - The effector statements based on which method invocations are done
Throws:
SweetException - if an error occurs (e.g. not being able to load the effector class)

matches

private boolean matches(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CslitType cslit,
                        org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.EffeType effectorStatement)
Checks to see if a given cslit has an effector (atoms are converted to cslits)

Parameters:
cslit - The cslit to be checked to see if effecting is to be done
effectorStatement - The effector statement to be checked to see if a fact matches
Returns:
true if the effector predicate matches atleast one predicate of the fact