public class BasicBackwardRuleReasoner implements Reasoner(Code)
Reasoner implementation which augments or transforms an RDF graph
according to a set of rules. The rules are processed using a
tabled backchaining interpreter which is implemented by the
relvant InfGraph class.
author: Dave Reynolds version: $Revision: 1.11 $ on $Date: 2008/01/02 12:09:44 $
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.
Flag which, if true, enables tracing of rule actions to logger.info
Constructor Detail
BasicBackwardRuleReasoner
public BasicBackwardRuleReasoner(List rules)(Code)
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. In the case of the this
reasoner there are no configuration parameters and this method is simply
here to meet the interfaces specification
Parameters: parameter - 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.