|
||||||||||
| PREV CLASS NEXT CLASS | NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Agenda interface publishes the API for an agenda defined in the Eclipse "defruleset" construct.
An agenda belongs to a Ruleset and contains a set of rules.
An agenda is returned by Ruleset.findAgenda(String) and Rule.getAgenda().
| Method Summary | |
void |
excise()
Removes the agenda from the knowledgebase and calls KnowledgeBaseObject.release(). |
Rule |
findRule(java.lang.String name)
Find the rule with the specified name in the agenda. |
java.lang.String |
getName()
Get the name of an agenda. |
RuleIterator |
getRules()
|
Ruleset |
getRuleset()
Get the ruleset to which the agenda belongs. |
int |
getSalience()
Get the salience of the Agenda |
long |
run(WorkingMemory wm)
Runs the inference engine, executing rules from the agenda within this ruleset |
long |
run(WorkingMemory wm,
long limit)
Runs the inference engine, executing rules from theagenda until the limit has been reached. |
| Methods inherited from interface com.haley.haleyrules.KnowledgeBaseObject |
getKnowledgeBase, release |
| Method Detail |
public RuleIterator getRules()
throws EclipseException
EclipseException
public Rule findRule(java.lang.String name)
throws EclipseException
KnowledgeBaseObject.release() or Rule.excise().
name - the name of the rule
EclipseException - if the knowledge base has been deleted
EclipseException - if the ruleset for this agenda has been excised
EclipseException - if the agenda has been excisedRule.excise(),
KnowledgeBaseObject.release()
public java.lang.String getName()
throws EclipseException
EclipseException - if the knowledge base has been deleted
EclipseException - if the ruleset for this agenda has been
EclipseException - if the agenda has been
EclipseException - if the rule could not be found
public Ruleset getRuleset()
throws EclipseException
EclipseException - if the knowledge base has been deleted
EclipseException - if the ruleset for this agenda has been excised
EclipseException - if the agenda has been excised
EclipseException - if the rule could not be found
public int getSalience()
throws EclipseException
EclipseException - if the knowledge base has been deleted
EclipseException - if the ruleset for this agenda has been excised
EclipseException - if the agenda has been excised
EclipseException - if the rule could not be found
public void excise()
throws EclipseException
KnowledgeBaseObject.release().
Any subsequent use of any member function, other than KnowledgeBaseObject.release(), will result in an exception.
Since all rules within the agenda are also removed, any subsequent use of these objects, other than KnowledgeBaseObject.release(),
will also result in an exception.
Even after an excise, every function that returned the agenda, e.g, Ruleset.findAgenda(String) or Rule.getAgenda(), must be paired
with a corresponding call to KnowledgeBaseObject.release() or excise().
EclipseException - if the knowledge base has been deleted
EclipseException - if the ruleset for this agenda has been excised
EclipseException - if the agenda has been excised
EclipseException - if the rule could not be found
public long run(WorkingMemory wm,
long limit)
throws EclipseException
wm - the working memory for the runlimit - the maximum number of rules to fire, where -1 indicates that there is no limit
EclipseException - if the knowledge base has been deleted
EclipseException - if the working memory has been deleted
EclipseException - if the ruleset has been excised
EclipseException - if an error occursrun(WorkingMemory),
Ruleset.run(WorkingMemory,long),
Ruleset.run(WorkingMemory),
WorkingMemory.run(long),
WorkingMemory.run()
public long run(WorkingMemory wm)
throws EclipseException
wm - the working memory for the run
EclipseException - if the knowledge base has been deleted
EclipseException - if the working memory has been deleted
EclipseException - if the ruleset has been excised
EclipseException - if an error occursrun(WorkingMemory,long),
Ruleset.run(WorkingMemory,long),
Ruleset.run(WorkingMemory),
WorkingMemory.run(long),
WorkingMemory.run()
|
||||||||||
| PREV CLASS NEXT CLASS | NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||