| com.hp.hpl.jena.reasoner.BaseInfGraph com.hp.hpl.jena.reasoner.rulesys.BasicForwardRuleInfGraph com.hp.hpl.jena.reasoner.rulesys.FBRuleInfGraph com.hp.hpl.jena.reasoner.rulesys.impl.oldCode.FBLPRuleInfGraph
FBLPRuleInfGraph | public class FBLPRuleInfGraph extends FBRuleInfGraph (Code) | | An inference graph that uses a mixture of forward and backward
chaining rules. This is a temporary harness for testing the LP engine.
When that works the content of this class will be folded into FBRuleInfGraph
and this one will disappear
author: Dave Reynolds version: $Revision: 1.8 $ on $Date: 2008/01/02 12:09:44 $ |
Method Summary | |
public void | addBRule(Rule brule) Adds a new Backward rule as a rusult of a forward rule process. | public void | addBRules(List rules) | public void | deleteBRule(Rule brule) Deletes a new Backward rule as a rules of a forward rule process. | public ExtendedIterator | findWithContinuation(TriplePattern pattern, Finder continuation) Extended find interface used in situations where the implementator
may or may not be able to answer the complete query. | public List | getBRules() Return an ordered list of all registered backward rules. | public long | getNRulesFired() | public synchronized void | performAdd(Triple t) Add one triple to the data graph, run any rules triggered by
the new data item, recursively adding any generated triples. | public void | performDelete(Triple t) Removes the triple t (if possible) from the set belonging to this graph. | public void | printLPProfile() Print a profile of LP rules used since the last reset. | public boolean | processBuiltin(Object clause, Rule rule, BindingEnvironment env) | public void | rebind() Cause the inference graph to reconsult the underlying graph to take
into account changes. | public void | reset() Flush out all cached results. | public void | resetLPProfile(boolean enable) Reset the LP engine profile. | public void | setDerivationLogging(boolean recordDerivations) | public void | setTabled(Node predicate) Set a predicate to be tabled/memoized by the LP engine. | public void | setTraceOn(boolean state) Set the state of the trace flag. |
lpbEngine | protected LPBRuleEngine lpbEngine(Code) | | The core backward rule engine which includes all the memoized results
|
FBLPRuleInfGraph | public FBLPRuleInfGraph(Reasoner reasoner, Graph schema)(Code) | | Constructor.
Parameters: reasoner - the reasoner which created this inf graph instance Parameters: schema - the (optional) schema graph to be included |
FBLPRuleInfGraph | public FBLPRuleInfGraph(Reasoner reasoner, List rules, Graph schema)(Code) | | Constructor.
Parameters: reasoner - the reasoner which created this inf graph instance Parameters: rules - the rules to process Parameters: schema - the (optional) schema graph to be included |
FBLPRuleInfGraph | public FBLPRuleInfGraph(Reasoner reasoner, List rules, Graph schema, Graph data)(Code) | | Constructor.
Parameters: reasoner - the reasoner which created this inf graph instance Parameters: rules - the rules to process Parameters: schema - the (optional) schema graph to be included Parameters: data - the data graph to be processed |
addBRule | public void addBRule(Rule brule)(Code) | | Adds a new Backward rule as a rusult of a forward rule process. Only some
infgraphs support this.
|
addBRules | public void addBRules(List rules)(Code) | | Adds a set of new Backward rules
|
deleteBRule | public void deleteBRule(Rule brule)(Code) | | Deletes a new Backward rule as a rules of a forward rule process. Only some
infgraphs support this.
|
findWithContinuation | public ExtendedIterator findWithContinuation(TriplePattern pattern, Finder continuation)(Code) | | Extended find interface used in situations where the implementator
may or may not be able to answer the complete query. It will
attempt to answer the pattern but if its answers are not known
to be complete then it will also pass the request on to the nested
Finder to append more results.
Parameters: pattern - a TriplePattern to be matched against the data Parameters: continuation - either a Finder or a normal Graph whichwill be asked for additional match results if the implementormay not have completely satisfied the query. |
getBRules | public List getBRules()(Code) | | Return an ordered list of all registered backward rules. Includes those
generated by forward productions.
|
getNRulesFired | public long getNRulesFired()(Code) | | Return the number of rules fired since this rule engine instance
was created and initialized
|
performAdd | public synchronized void performAdd(Triple t)(Code) | | Add one triple to the data graph, run any rules triggered by
the new data item, recursively adding any generated triples.
|
performDelete | public void performDelete(Triple t)(Code) | | Removes the triple t (if possible) from the set belonging to this graph.
|
printLPProfile | public void printLPProfile()(Code) | | Print a profile of LP rules used since the last reset.
|
processBuiltin | public boolean processBuiltin(Object clause, Rule rule, BindingEnvironment env)(Code) | | Process a call to a builtin predicate
Parameters: clause - the Functor representing the call Parameters: env - the BindingEnvironment for this call Parameters: rule - the rule which is invoking this call true if the predicate succeeds |
rebind | public void rebind()(Code) | | Cause the inference graph to reconsult the underlying graph to take
into account changes. Normally changes are made through the InfGraph's add and
remove calls are will be handled appropriately. However, in some cases changes
are made "behind the InfGraph's back" and this forces a full reconsult of
the changed data.
|
reset | public void reset()(Code) | | Flush out all cached results. Future queries have to start from scratch.
|
resetLPProfile | public void resetLPProfile(boolean enable)(Code) | | Reset the LP engine profile.
Parameters: enable - it true then profiling will continue with a new empty profile table,if false profiling will stop all current data lost. |
setDerivationLogging | public void setDerivationLogging(boolean recordDerivations)(Code) | | Set to true to enable derivation caching
|
setTabled | public void setTabled(Node predicate)(Code) | | Set a predicate to be tabled/memoized by the LP engine.
|
setTraceOn | public void setTraceOn(boolean state)(Code) | | Set the state of the trace flag. If set to true then rule firings
are logged out to the Log at "INFO" level.
|
|
|