Abstract super class for knowledge bases. Includes some support methods for event handling.
Queries are organized in a Hashtable.
author: Jens Dietrich version: 3.4 <7 March 05> since: 1.2
getPredicate(String name) Get a predicate by name.
Note that there might by more than one predicate in the kb with the same name.
In some cases, this makes sense (e.g.
Fire a knowledge base change event.
See Also:KnowledgeBaseChangeEvent Parameters: state - should be one of the constant defined in KnowledgeBaseEvent Parameters: changed - the affected clause set
Fire a knowledge base changed event.
See Also:KnowledgeBaseChangeEvent Parameters: state - should be one of the constant defined in KnowledgeBaseEvent Parameters: changed - the collection of affected clause sets
Get a predicate by name.
Note that there might by more than one predicate in the kb with the same name.
In some cases, this makes sense (e.g. polymorphic predicates such as < for different
types), but should be avoided for "custom" predicates (such as SimplePredicates).
In this case, this method should return one predicate. In this case, applications can still use
predicates() in order to find all predicates with a particular name.
a predicate or null indicating that the kb does not contain a predicate with this name Parameters: name - a predicate name
Get a query by name or null if there is no query with this name.
Parameters: queryName - a query name a query of null if there is no query registered with this name