Reference implementation for (simple) facts. In older versions (prior to 1.9)
there was no separate Query interface/class - facts were used instead.
In order to facilitate maintanance of older applications, this class still implements
Query. Some newer features, in particular DerivationEventListeners, are not supported.
For queries, QueryImpl should be used instead.
See Also:QueryImpl author: Jens Dietrich version: 3.4 <7 March 05> since: 1.1 since: Prova re-integration modifications author: Alex Kozlenkov version: 3.4 <7 March 05>
propertyNames() Returns an enumeration of all the keys in this property list, including distinct
keys in the default property list if a key of the same name has not already been
found from the main properties list.
Apply a set of replacements to a clause. Returns a new clause!
the fact (clause) resulting from the application of the replacements Parameters: r - a collection of replacements
Apply a single replacement to a fact. Returns a new clause!
the fact (clause) resulting from the application of the replacemen Parameters: r - the replacement
Apply a set of replacements to a fact. Returns a new fact!
the fact resulting from the application of the replacement Parameters: r - a collection of replacement
Apply a single replacement to a fact. Returns a new fact!
the fact (clause) resulting from the application of the replacement Parameters: r - a replacement
Get an iterator for clauses. The parameters are ignored and clauses() is called!
a clause iterator Parameters: query - a query Parameters: additionalParameter - an additional parameter
Get the clause set containing the clause. This method is in particular useful for analyzing derivations,
since derivations show only the clauses used, not the clause set generating this clauses (e.g., AutoFacts). On the other
hand, knowledge bases contain often clause sets. So it could be hard to find the clause sets in the knowledge base
that caused a certain result. For some clauses such as facts, the container is just the fact itself.
a clause set
Get a key for fast access. The key is usually the predicate, but subclasses
might want to use different keys. Note that keys are mainly used by inference engines and
knowledge bases to improve performance and inference engine and knowledge bases
must know about the semantics of keys to use them correctly!
the key object
Returns an enumeration of all the keys in this property list, including distinct
keys in the default property list if a key of the same name has not already been
found from the main properties list.
an enumeration of all the keys in this property list, including the keys inthe default property list
Resolve a fact: if supported, the predicate
should be performed using its semantic. E.g., for a fact
like isFather(Max,Jens) the function isFather is performed
for the objects (constant terms) Max and Jens and the result (e.g., true) is returned.
Note that not all predicates support this (since not all predicates
have a semantic), and the operation can also fail
in case one term is variable. In these cases we throw appropriate exceptions.
Parameters: session - a session object the result of resolving the term throws: java.lang.UnsupportedOperationException - throws: java.lang.IllegalArgumentException -
Set the facts. Not supported by facts, throws an exception!
Please use QueryImpl for queries!
See Also:org.mandarax.kernel.Query Parameters: facts - an array of facts
Set a property.
Parameters: key - the key Parameters: value - the value the previous value of the specified key in this property list, or null if it did not have one.
Fields inherited from org.mandarax.reference.Complex