zeus.rete
Class ReteEngine

java.lang.Object
  extended byzeus.rete.ReteEngine

public class ReteEngine
extends java.lang.Object


Nested Class Summary
protected  class ReteEngine.SymFactAction
           
 
Field Summary
protected  ConflictSet conflictSet
           
protected  AgentContext context
           
private  HSet[] eventMonitor
           
protected  java.util.Hashtable factDb
           
protected  java.util.Hashtable ids
           
protected  Fact initial_fact
           
protected  int joinPathNo
           
protected  java.util.Vector joins
           
protected static java.lang.String JPATH
           
private  HSet localMonitor
           
protected  OntologyDb ontologyDb
           
protected static java.lang.String PATH
           
protected  int pathNo
           
protected  java.util.Hashtable roots
           
(package private) static int RULE_ACTIVATED
           
(package private) static int RULE_ADDED
           
(package private) static int RULE_DEACTIVATED
           
(package private) static int RULE_FIRED
           
(package private) static int RULE_REMOVED
           
protected  java.util.Vector singles
           
protected  java.util.Vector tests
           
 
Constructor Summary
ReteEngine()
           
ReteEngine(AgentContext context)
           
ReteEngine(OntologyDb ontologyDb)
           
 
Method Summary
 void add(ReteKB kb)
           
 void add(Rule r)
           
 void addLocalFactMonitor(LocalFactMonitor monitor)
           
 void addMonitor(ReteEngineMonitor monitor, long event_type)
           
(package private)  void fireEvent(int type, ActionNode node, java.lang.String diagnostic)
           
(package private)  void fireLocalFactMonitor(int tag, Fact f)
           
 AgentContext getAgentContext()
           
(package private)  ConflictSet getConfictSet()
           
(package private)  java.util.Hashtable getFactDb()
           
private  OntologyDb ontology()
           
 void remove(Rule r)
           
 void removeLocalFactMonitor(LocalFactMonitor monitor)
           
 void removeMonitor(ReteEngineMonitor monitor, long event_type)
           
 void reset()
           
 void run()
           
 void update(int tag, Fact f)
          Update is the method which is called to decide if a rule should be fired or not when a fact is added to the ResourceDb.
 void update(int tag, ReteFact token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RULE_ACTIVATED

static final int RULE_ACTIVATED
See Also:
Constant Field Values

RULE_DEACTIVATED

static final int RULE_DEACTIVATED
See Also:
Constant Field Values

RULE_ADDED

static final int RULE_ADDED
See Also:
Constant Field Values

RULE_REMOVED

static final int RULE_REMOVED
See Also:
Constant Field Values

RULE_FIRED

static final int RULE_FIRED
See Also:
Constant Field Values

factDb

protected java.util.Hashtable factDb

PATH

protected static final java.lang.String PATH
See Also:
Constant Field Values

JPATH

protected static final java.lang.String JPATH
See Also:
Constant Field Values

roots

protected java.util.Hashtable roots

ids

protected java.util.Hashtable ids

singles

protected java.util.Vector singles

joins

protected java.util.Vector joins

tests

protected java.util.Vector tests

pathNo

protected int pathNo

joinPathNo

protected int joinPathNo

conflictSet

protected ConflictSet conflictSet

initial_fact

protected Fact initial_fact

context

protected AgentContext context

ontologyDb

protected OntologyDb ontologyDb

eventMonitor

private HSet[] eventMonitor

localMonitor

private HSet localMonitor
Constructor Detail

ReteEngine

public ReteEngine()

ReteEngine

public ReteEngine(AgentContext context)

ReteEngine

public ReteEngine(OntologyDb ontologyDb)
Method Detail

getAgentContext

public AgentContext getAgentContext()

run

public void run()

reset

public void reset()

getConfictSet

ConflictSet getConfictSet()

getFactDb

java.util.Hashtable getFactDb()

update

public void update(int tag,
                   ReteFact token)

update

public void update(int tag,
                   Fact f)
Update is the method which is called to decide if a rule should be fired or not when a fact is added to the ResourceDb. Change Log ---------- 26/06/01 - 1.3 - Simon Thompson added some code to check not only for rootnodes of the same type as the added fact, but also the ancestors of the fact to. However, note that only one rule will be fired!


ontology

private OntologyDb ontology()

add

public void add(ReteKB kb)

add

public void add(Rule r)

remove

public void remove(Rule r)

addLocalFactMonitor

public void addLocalFactMonitor(LocalFactMonitor monitor)

removeLocalFactMonitor

public void removeLocalFactMonitor(LocalFactMonitor monitor)

fireLocalFactMonitor

void fireLocalFactMonitor(int tag,
                          Fact f)

addMonitor

public void addMonitor(ReteEngineMonitor monitor,
                       long event_type)

removeMonitor

public void removeMonitor(ReteEngineMonitor monitor,
                          long event_type)

fireEvent

void fireEvent(int type,
               ActionNode node,
               java.lang.String diagnostic)


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.