|
||||||||||
| PREV CLASS NEXT CLASS | NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Ruleset interface publishes the API for a ruleset defined by the Eclipse "defruleset" construct.
A rulset belongs to a knowledge base and contains a set of agendas
A ruleset is returned by KnowledgeBase.findRuleset(String) and Agenda.getRuleset().
| Method Summary | |
void |
excise()
Removes the ruleset from the knowledge base and calls KnowledgeBaseObject.release(). |
Agenda |
findAgenda(java.lang.String name)
Finds the Agenda agenda for this ruleset with the specified name. |
AgendaIterator |
getAgendas()
|
java.lang.String |
getName()
|
int |
getSalience()
Returns the salience for the ruleset. |
long |
run(WorkingMemory wm)
Runs the inference engine, executing rules from any agenda within this ruleset |
long |
run(WorkingMemory wm,
long limit)
Runs the inference engine, executing rules from any agenda within this ruleset until the limit has been reached. |
| Methods inherited from interface com.haley.haleyrules.KnowledgeBaseObject |
getKnowledgeBase, release |
| Method Detail |
public AgendaIterator getAgendas()
throws EclipseException
EclipseException
public Agenda findAgenda(java.lang.String name)
throws EclipseException
Agenda agenda for this ruleset with the specified name.
Each call to this function must be accompanied with a corresponding call to KnowledgeBaseObject.release() or Agenda.excise().
name - the name of the agenda to look for
EclipseException - if knowledge base has been cleared
EclipseException - if the ruleset has been excisedKnowledgeBase.findRuleset(String),
KnowledgeBaseObject.release()
public java.lang.String getName()
throws EclipseException
EclipseException - if knowledge base has been cleared
EclipseException - if ruleset has been excised
public int getSalience()
throws EclipseException
EclipseException - if knowledge base has been cleared
EclipseException - if ruleset has been excised
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 agendas within the ruleset, as well as all of the rules within their agendas, are also removed,
any subsequent use of these objects will also result in an exception.
Even after an excise, every function that returned the ruleset, e.g., KnowledgeBase.findRuleset(String) or Agenda.getRuleset(),
must be paired with a corresponding call to KnowledgeBaseObject.release() or excise().
EclipseException - if knowledge base has been cleared
EclipseException - if ruleset has been excised
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 knowledgebase has been cleared
EclipseException - if the working memory has been deleted
EclipseException - if the ruleset has been excised
EclipseException - if an error occursrun(WorkingMemory),
Agenda.run(WorkingMemory,long),
Agenda.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 cleared
EclipseException - if the working memory has been deleted
EclipseException - if the ruleset has been excised
EclipseException - if an error occursrun(WorkingMemory,long),
Agenda.run(WorkingMemory,long),
Agenda.run(WorkingMemory),
WorkingMemory.run(long),
WorkingMemory.run()
|
||||||||||
| PREV CLASS NEXT CLASS | NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||