Rule-based reasoner interface. This is the default rule reasoner to use.
It supports both forward reasoning and backward reasoning, including use
of forward rules to generate and instantiate backward rules.
This version is purely temporary during development of the LP engine and will get
replaced by the upgraded FBRuleReasoner when the LP section is released.
author: Dave Reynolds version: $Revision: 1.11 $ on $Date: 2008/01/02 12:09:45 $
FBLPRuleReasoner(List rules, Graph schemaGraph, ReasonerFactory factory) Internal constructor, used to generated a partial binding of a schema
to a rule reasoner instance.
Method Summary
public void
addDescription(Model configSpec, Resource base) Add a configuration description for this reasoner into a partial
configuration specification model.
bind(Graph data) Attach the reasoner to a set of RDF data to process.
The reasoner may already have been bound to specific rules or ontology
axioms (encoded in RDF) through earlier bindRuleset calls.
Parameters: data - the RDF data to be processed, some reasoners may restrictthe range of RDF which is legal here (e.g.
setDerivationLogging(boolean logOn) Switch on/off drivation logging.
If set to true then the InfGraph created from the bind operation will start
life with recording of derivations switched on.
Constructor. This is the raw version that does not reference a ReasonerFactory
and so has no capabilities description.
Parameters: rules - a list of Rule instances which defines the ruleset to process
Constructor
Parameters: rules - a list of Rule instances which defines the ruleset to process Parameters: factory - the parent reasoner factory which is consulted to answer capability questions
Add a configuration description for this reasoner into a partial
configuration specification model.
Parameters: configSpec - a Model into which the configuration information should be placed Parameters: base - the Resource to which the configuration parameters should be added.
Attach the reasoner to a set of RDF data to process.
The reasoner may already have been bound to specific rules or ontology
axioms (encoded in RDF) through earlier bindRuleset calls.
Parameters: data - the RDF data to be processed, some reasoners may restrictthe range of RDF which is legal here (e.g. syntactic restrictions in OWL). an inference graph through which the data+reasoner can be queried. throws: ReasonerException - if the data is ill-formed according to theconstraints imposed by this reasoner.
Return a description of the capabilities of this reasoner encoded in
RDF. These capabilities may be static or may depend on configuration
information supplied at construction time. May be null if there are
no useful capabilities registered.
Return the this of Rules used by this reasoner
a List of Rule objects
setDerivationLogging
public void setDerivationLogging(boolean logOn)(Code)
Switch on/off drivation logging.
If set to true then the InfGraph created from the bind operation will start
life with recording of derivations switched on. This is currently only of relevance
to rule-based reasoners.
Set a configuration paramter for the reasoner. The supported parameters
are:
PROPderivationLogging - set to true to enable recording all rule derivations
PROPtraceOn - set to true to enable verbose trace information to be sent to the logger INFO channel
Parameters: parameterUri - the property identifying the parameter to be changed Parameters: value - the new value for the parameter, typically this is a wrappedjava object like Boolean or Integer.
Set the state of the trace flag. If set to true then rule firings
are logged out to the Log at "INFO" level.
supportsProperty
public boolean supportsProperty(Property property)(Code)
Determine whether the given property is recognized and treated specially
by this reasoner. This is a convenience packaging of a special case of getCapabilities.
Parameters: property - the property which we want to ask the reasoner about, given as a Node sincethis is part of the SPI rather than API true if the given property is handled specially by the reasoner.
tablePredicate
public synchronized void tablePredicate(Node predicate)(Code)
Register an RDF predicate as one whose presence in a goal should force
the goal to be tabled. This is better done directly in the rule set.