zeus.rete
Class ConflictSet

java.lang.Object
  extended byjava.lang.Thread
      extended byzeus.rete.ConflictSet
All Implemented Interfaces:
java.lang.Runnable

public class ConflictSet
extends java.lang.Thread


Field Summary
 int cleanUpInterval
           
protected  AgentContext context
           
protected  OntologyDb db
           
protected  ReteEngine engine
           
(package private)  Queue queue
           
protected  java.util.Hashtable readers
           
protected  boolean running
           
protected  java.util.Hashtable writers
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) ConflictSet(AgentContext context)
           
(package private) ConflictSet(ReteEngine engine, OntologyDb db)
           
 
Method Summary
 void assertFact(Fact f1)
           
 void createReader(java.lang.String logicalName, java.io.InputStream in)
          createReader method is used by the ReteEngine to open a read stream
 void createReader(java.lang.String logicalName, java.lang.String filename)
          createReader method is used by the ReteEngine to open a read stream
 void createWriter(java.lang.String logicalName, java.io.OutputStream os)
          createWriter method is used by the ReteEngine to open a write stream
 void createWriter(java.lang.String logicalName, java.lang.String filename, boolean append)
          createWriter method is used by the ReteEngine to open a write stream
protected  void executeAction(Action a, Info info)
          executeAction is what causes a rule action to be executed when a rule has been matched to.
private  java.lang.String getFactList(java.util.Vector input)
           
 java.util.Hashtable getReaders()
          return the tables where the readers are stored for the read and readln actions
 java.util.Hashtable getWriters()
          return the hashtable where the output writers are stored for the print and println actions
(package private)  OntologyDb ontology()
          superceeded by getOntologyDb()
 void reset()
           
 void retract(Fact f1)
           
 void run()
           
private  boolean sameInput(java.util.Vector store, java.util.Vector input)
          store and input contain an ordered list of (ground) facts The method getIdString() of the Fact class can be used to compare the lists
 void setReaders(java.util.Hashtable readers)
          set the hashtable of readers for the rete actions - it is unlikely that agent developers will need this method
 void setWriters(java.util.Hashtable writers)
          set the hashtable of writers for the rete actions - unlikely to be of much use to agent developers
 java.lang.String toString()
           
(package private)  void update(java.lang.String path, int tag, java.util.Vector input, Bindings bindings, ActionNode node)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

engine

protected ReteEngine engine

context

protected AgentContext context

db

protected OntologyDb db

running

protected boolean running

writers

protected java.util.Hashtable writers

readers

protected java.util.Hashtable readers

cleanUpInterval

public int cleanUpInterval

queue

Queue queue
Constructor Detail

ConflictSet

ConflictSet(ReteEngine engine,
            OntologyDb db)

ConflictSet

ConflictSet(AgentContext context)
Method Detail

getWriters

public java.util.Hashtable getWriters()
return the hashtable where the output writers are stored for the print and println actions


getReaders

public java.util.Hashtable getReaders()
return the tables where the readers are stored for the read and readln actions


setReaders

public void setReaders(java.util.Hashtable readers)
set the hashtable of readers for the rete actions - it is unlikely that agent developers will need this method


setWriters

public void setWriters(java.util.Hashtable writers)
set the hashtable of writers for the rete actions - unlikely to be of much use to agent developers


createWriter

public void createWriter(java.lang.String logicalName,
                         java.io.OutputStream os)
createWriter method is used by the ReteEngine to open a write stream


createWriter

public void createWriter(java.lang.String logicalName,
                         java.lang.String filename,
                         boolean append)
createWriter method is used by the ReteEngine to open a write stream


createReader

public void createReader(java.lang.String logicalName,
                         java.lang.String filename)
createReader method is used by the ReteEngine to open a read stream


createReader

public void createReader(java.lang.String logicalName,
                         java.io.InputStream in)
createReader method is used by the ReteEngine to open a read stream


ontology

OntologyDb ontology()
superceeded by getOntologyDb()


update

void update(java.lang.String path,
            int tag,
            java.util.Vector input,
            Bindings bindings,
            ActionNode node)

reset

public void reset()

assertFact

public void assertFact(Fact f1)

retract

public void retract(Fact f1)

run

public void run()

executeAction

protected void executeAction(Action a,
                             Info info)
executeAction is what causes a rule action to be executed when a rule has been matched to. This uses an AbstractFactory to get the action and then asks it to execute itself


getFactList

private java.lang.String getFactList(java.util.Vector input)

sameInput

private boolean sameInput(java.util.Vector store,
                          java.util.Vector input)
store and input contain an ordered list of (ground) facts The method getIdString() of the Fact class can be used to compare the lists


toString

public java.lang.String toString()


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