public class FBRuleReasoner extends Object implements RuleReasoner
| Constructor and Description |
|---|
FBRuleReasoner(List<Rule> rules)
Constructor.
|
FBRuleReasoner(List<Rule> rules,
ReasonerFactory factory)
Constructor
|
FBRuleReasoner(ReasonerFactory factory)
Constructor
|
FBRuleReasoner(ReasonerFactory factory,
Resource configuration)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDescription(Model configSpec,
Resource base)
Add a configuration description for this reasoner into a partial
configuration specification model.
|
FBRuleReasoner |
addRules(List<Rule> rules)
Add the given rules to the current set and answer this Reasoner.
|
InfGraph |
bind(Graph data)
Attach the reasoner to a set of RDF data to process.
|
Reasoner |
bindSchema(Graph tbox)
Precompute the implications of a schema graph.
|
Reasoner |
bindSchema(Model tbox)
Precompute the implications of a schema Model.
|
Graph |
getBoundSchema()
Answer the schema graph bound into this reasoner, or null if there
isn't one.
|
Capabilities |
getGraphCapabilities()
Return the Jena Graph Capabilties that the inference graphs generated
by this reasoner are expected to conform to.
|
Model |
getReasonerCapabilities()
Return a description of the capabilities of this reasoner encoded in
RDF.
|
List<Rule> |
getRules()
Return the list of Rules used by this reasoner
|
boolean |
isTraceOn()
Return the state of the trace flag.If set to true then rule firings
are logged out to the Log at "INFO" level.
|
static List<Rule> |
loadRules(String fileName)
Answer the list of rules loaded from the given filename.
|
void |
setDerivationLogging(boolean logOn)
Switch on/off drivation logging.
|
void |
setParameter(Property parameter,
Object value)
Set a configuration parameter for the reasoner.
|
void |
setRules(List<Rule> 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(Property property)
Determine whether the given property is recognized and treated specially
by this reasoner.
|
void |
tablePredicate(Node predicate)
Register an RDF predicate as one whose presence in a goal should force
the goal to be tabled.
|
public FBRuleReasoner(List<Rule> rules)
rules - a list of Rule instances which defines the ruleset to processpublic FBRuleReasoner(ReasonerFactory factory)
factory - the parent reasoner factory which is consulted to answer capability questionspublic FBRuleReasoner(ReasonerFactory factory, Resource configuration)
factory - the parent reasoner factory which is consulted to answer capability questionsconfiguration - RDF node to configure the rule set and mode, can be nullpublic FBRuleReasoner(List<Rule> rules, ReasonerFactory factory)
rules - a list of Rule instances which defines the ruleset to processfactory - the parent reasoner factory which is consulted to answer capability questionspublic FBRuleReasoner addRules(List<Rule> rules)
public Model getReasonerCapabilities()
getReasonerCapabilities in interface Reasonerpublic Graph getBoundSchema()
public void addDescription(Model configSpec, Resource base)
addDescription in interface ReasonerconfigSpec - a Model into which the configuration information should be placedbase - the Resource to which the configuration parameters should be added.public boolean supportsProperty(Property property)
supportsProperty in interface Reasonerproperty - the property which we want to ask the reasoner about, given as a Node since
this is part of the SPI rather than APIpublic Reasoner bindSchema(Graph tbox) throws ReasonerException
bindSchema in interface Reasonertbox - the ontology axioms or rule set encoded in RDFReasonerException - if the reasoner cannot be
bound to a rule set in this way, for example if the underlying engine
can only accept a single rule set in this way and one rule set has
already been bound in of if the ruleset is illformed.public Reasoner bindSchema(Model tbox) throws ReasonerException
bindSchema in interface Reasonertbox - the ontology axioms or rule set encoded in RDFReasonerException - if the reasoner cannot be
bound to a rule set in this way, for example if the underlying engine
can only accept a single rule set in this way and one rule set has
already been bound in of if the ruleset is illformed.public InfGraph bind(Graph data) throws ReasonerException
bind in interface Reasonerdata - the RDF data to be processed, some reasoners may restrict
the range of RDF which is legal here (e.g. syntactic restrictions in OWL).ReasonerException - if the data is ill-formed according to the
constraints imposed by this reasoner.public void setRules(List<Rule> rules)
setRules in interface RuleReasonerrules - a list of Rule objectspublic List<Rule> getRules()
getRules in interface RuleReasonerpublic static List<Rule> loadRules(String fileName)
public void tablePredicate(Node predicate)
public void setDerivationLogging(boolean logOn)
Default - false.
setDerivationLogging in interface Reasonerpublic void setTraceOn(boolean state)
public boolean isTraceOn()
public void setParameter(Property parameter, Object value)
setParameter in interface Reasonerparameter - the property identifying the parameter to be changedvalue - the new value for the parameter, typically this is a wrapped
java object like Boolean or Integer.IllegalParameterException - if the parameter is unknownpublic Capabilities getGraphCapabilities()
getGraphCapabilities in interface ReasonerLicenced under the Apache License, Version 2.0