Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hp.hpl.jena.reasoner.rulesys.impl.oldCode
Class FBLPRuleReasoner  view FBLPRuleReasoner download FBLPRuleReasoner.java

java.lang.Object
  extended bycom.hp.hpl.jena.reasoner.rulesys.impl.oldCode.FBLPRuleReasoner
All Implemented Interfaces:
com.hp.hpl.jena.reasoner.Reasoner

public class FBLPRuleReasoner
extends java.lang.Object
implements com.hp.hpl.jena.reasoner.Reasoner

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.

Version:
$Revision: 1.8 $ on $Date: 2005/02/21 12:18:03 $

Field Summary
protected static boolean cachePreload
          Flag, if true we cache the closure of the pure rule set with its axioms
protected  com.hp.hpl.jena.graph.Capabilities capabilities
          The graph capabilities of the infgraphs generated by this reasoner
protected  com.hp.hpl.jena.reasoner.ReasonerFactory factory
          The parent reasoner factory which is consulted to answer capability questions
protected  com.hp.hpl.jena.reasoner.InfGraph preload
          The cached empty closure, if wanted
protected  boolean recordDerivations
          Flag to set whether the inference class should record derivations
protected  java.util.List rules
          The rules to be used by this instance of the forward engine
protected  com.hp.hpl.jena.graph.Graph schemaGraph
          A precomputed set of schema deductions
protected  boolean traceOn
          Flag which, if true, enables tracing of rule actions to logger.info
 
Constructor Summary
  FBLPRuleReasoner(java.util.List rules)
          Constructor.
protected FBLPRuleReasoner(java.util.List rules, com.hp.hpl.jena.graph.Graph schemaGraph, com.hp.hpl.jena.reasoner.ReasonerFactory factory)
          Internal constructor, used to generated a partial binding of a schema to a rule reasoner instance.
  FBLPRuleReasoner(java.util.List rules, com.hp.hpl.jena.reasoner.ReasonerFactory factory)
          Constructor
  FBLPRuleReasoner(com.hp.hpl.jena.reasoner.ReasonerFactory factory)
          Constructor
 
Method Summary
 void addDescription(com.hp.hpl.jena.rdf.model.Model configSpec, com.hp.hpl.jena.rdf.model.Resource base)
          Add a configuration description for this reasoner into a partial configuration specification model.
 com.hp.hpl.jena.reasoner.InfGraph bind(com.hp.hpl.jena.graph.Graph data)
          Attach the reasoner to a set of RDF data to process.
 com.hp.hpl.jena.reasoner.Reasoner bindSchema(com.hp.hpl.jena.graph.Graph tbox)
          Precompute the implications of a schema graph.
 com.hp.hpl.jena.reasoner.Reasoner bindSchema(com.hp.hpl.jena.rdf.model.Model tbox)
          Precompute the implications of a schema Model.
 com.hp.hpl.jena.graph.Capabilities getGraphCapabilities()
          Return the Jena Graph Capabilties that the inference graphs generated by this reasoner are expected to conform to.
protected  com.hp.hpl.jena.reasoner.InfGraph getPreload()
          Get the single static precomputed rule closure.
 com.hp.hpl.jena.rdf.model.Model getReasonerCapabilities()
          Return a description of the capabilities of this reasoner encoded in RDF.
 java.util.List getRules()
          Return the this of Rules used by this reasoner
 void setDerivationLogging(boolean logOn)
          Switch on/off drivation logging.
 void setParameter(com.hp.hpl.jena.rdf.model.Property parameter, java.lang.Object value)
          Set a configuration paramter for the reasoner.
 void setRules(java.util.List rules)
          Set (or change) the rule set that this reasoner should execute.
 void setTraceOn(boolean state)
          Set the state of the trace flag.
 boolean supportsProperty(com.hp.hpl.jena.rdf.model.Property property)
          Determine whether the given property is recognized and treated specially by this reasoner.
 void tablePredicate(com.hp.hpl.jena.graph.Node predicate)
          Register an RDF predicate as one whose presence in a goal should force the goal to be tabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected com.hp.hpl.jena.reasoner.ReasonerFactory factory
The parent reasoner factory which is consulted to answer capability questions


rules

protected java.util.List rules
The rules to be used by this instance of the forward engine


schemaGraph

protected com.hp.hpl.jena.graph.Graph schemaGraph
A precomputed set of schema deductions


recordDerivations

protected boolean recordDerivations
Flag to set whether the inference class should record derivations


traceOn

protected boolean traceOn
Flag which, if true, enables tracing of rule actions to logger.info


cachePreload

protected static final boolean cachePreload
Flag, if true we cache the closure of the pure rule set with its axioms

See Also:
Constant Field Values

preload

protected com.hp.hpl.jena.reasoner.InfGraph preload
The cached empty closure, if wanted


capabilities

protected com.hp.hpl.jena.graph.Capabilities capabilities
The graph capabilities of the infgraphs generated by this reasoner

Constructor Detail

FBLPRuleReasoner

public FBLPRuleReasoner(java.util.List rules)
Constructor. This is the raw version that does not reference a ReasonerFactory and so has no capabilities description.


FBLPRuleReasoner

public FBLPRuleReasoner(com.hp.hpl.jena.reasoner.ReasonerFactory factory)
Constructor


FBLPRuleReasoner

public FBLPRuleReasoner(java.util.List rules,
                        com.hp.hpl.jena.reasoner.ReasonerFactory factory)
Constructor


FBLPRuleReasoner

protected FBLPRuleReasoner(java.util.List rules,
                           com.hp.hpl.jena.graph.Graph schemaGraph,
                           com.hp.hpl.jena.reasoner.ReasonerFactory factory)
Internal constructor, used to generated a partial binding of a schema to a rule reasoner instance.

Method Detail

getReasonerCapabilities

public com.hp.hpl.jena.rdf.model.Model getReasonerCapabilities()
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.

Specified by:
getReasonerCapabilities in interface com.hp.hpl.jena.reasoner.Reasoner

addDescription

public void addDescription(com.hp.hpl.jena.rdf.model.Model configSpec,
                           com.hp.hpl.jena.rdf.model.Resource base)
Add a configuration description for this reasoner into a partial configuration specification model.

Specified by:
addDescription in interface com.hp.hpl.jena.reasoner.Reasoner

supportsProperty

public boolean supportsProperty(com.hp.hpl.jena.rdf.model.Property property)
Determine whether the given property is recognized and treated specially by this reasoner. This is a convenience packaging of a special case of getCapabilities.

Specified by:
supportsProperty in interface com.hp.hpl.jena.reasoner.Reasoner

bindSchema

public com.hp.hpl.jena.reasoner.Reasoner bindSchema(com.hp.hpl.jena.graph.Graph tbox)
                                             throws com.hp.hpl.jena.reasoner.ReasonerException
Precompute the implications of a schema graph. The statements in the graph will be combined with the data when the final InfGraph is created.

Specified by:
bindSchema in interface com.hp.hpl.jena.reasoner.Reasoner

bindSchema

public com.hp.hpl.jena.reasoner.Reasoner bindSchema(com.hp.hpl.jena.rdf.model.Model tbox)
                                             throws com.hp.hpl.jena.reasoner.ReasonerException
Precompute the implications of a schema Model. The statements in the graph will be combined with the data when the final InfGraph is created.

Specified by:
bindSchema in interface com.hp.hpl.jena.reasoner.Reasoner

bind

public com.hp.hpl.jena.reasoner.InfGraph bind(com.hp.hpl.jena.graph.Graph data)
                                       throws com.hp.hpl.jena.reasoner.ReasonerException
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.

Specified by:
bind in interface com.hp.hpl.jena.reasoner.Reasoner

setRules

public void setRules(java.util.List rules)
Set (or change) the rule set that this reasoner should execute.


getRules

public java.util.List getRules()
Return the this of Rules used by this reasoner


tablePredicate

public void tablePredicate(com.hp.hpl.jena.graph.Node predicate)
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.


getPreload

protected com.hp.hpl.jena.reasoner.InfGraph getPreload()
Get the single static precomputed rule closure.


setDerivationLogging

public void 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. This is currently only of relevance to rule-based reasoners.

Default - false.

Specified by:
setDerivationLogging in interface com.hp.hpl.jena.reasoner.Reasoner

setTraceOn

public void setTraceOn(boolean state)
Set the state of the trace flag. If set to true then rule firings are logged out to the Log at "INFO" level.


setParameter

public void setParameter(com.hp.hpl.jena.rdf.model.Property parameter,
                         java.lang.Object value)
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

Specified by:
setParameter in interface com.hp.hpl.jena.reasoner.Reasoner

getGraphCapabilities

public com.hp.hpl.jena.graph.Capabilities getGraphCapabilities()
Return the Jena Graph Capabilties that the inference graphs generated by this reasoner are expected to conform to.

Specified by:
getGraphCapabilities in interface com.hp.hpl.jena.reasoner.Reasoner