public class LPBackwardRuleInfGraph extends BaseInfGraph implements BackwardRuleInfGraphI
BaseInfGraph.InfCapabilities, BaseInfGraph.InfFindSafeCapabilities, BaseInfGraph.InfTransactionHandlerTOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMITemptyGraph| Constructor and Description |
|---|
LPBackwardRuleInfGraph(Reasoner reasoner,
com.hp.hpl.jena.reasoner.rulesys.impl.LPRuleStore ruleStore,
Graph data,
Graph schema)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
find(TriplePattern pattern)
Basic pattern lookup interface.
|
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
findDataMatches(TriplePattern pattern)
Match a pattern just against the stored data (raw data, schema,
axioms) but no derivation.
|
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
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.
|
Iterator<Derivation> |
getDerivation(Triple t)
Return the derivation of at triple.
|
Graph |
getSchemaGraph()
Return the schema graph, if any, bound into this inference graph.
|
Node |
getTemp(Node instance,
Node prop,
Node pclass)
Retrieve or create a bNode representing an inferred property value.
|
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
graphBaseFind(Node subject,
Node property,
Node object)
Returns an iterator over Triples.
|
boolean |
isTraceOn()
Return true if tracing is switched on
|
void |
logDerivation(Triple t,
Derivation derivation)
Log a dervivation record against the given triple.
|
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.
|
void |
performDelete(Triple t)
Removes the triple t (if possible) from the set belonging to this graph.
|
void |
prepare()
Perform any initial processing and caching.
|
boolean |
processBuiltin(ClauseEntry clause,
Rule rule,
BindingEnvironment env)
Process a call to a builtin predicate
|
void |
rebind()
Cause the inference graph to reconsult the underlying graph to take
into account changes.
|
void |
rebind(Graph data)
Replace the underlying data graph for this inference graph and start any
inferences over again.
|
void |
reset()
Flush out all cached results.
|
void |
setDerivationLogging(boolean recordDerivations)
Set to true to enable derivation caching
|
void |
setTabled(Node predicate)
Set a predicate to be tabled/memoized by the LP engine.
|
void |
setTraceOn(boolean state)
Set the state of the trace flag.
|
void |
silentAdd(Triple t)
Assert a new triple in the deduction graph, bypassing any processing machinery.
|
cloneWithPremises, close, constructReifier, find, getBulkUpdateHandler, getCapabilities, getDeductionsGraph, getGlobalProperty, getPrefixMapping, getRawGraph, getReasoner, getTransactionHandler, getVersion, graphBaseFind, graphBaseSize, isEmpty, isPrepared, testGlobalProperty, validateadd, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, getReifier, getStatisticsHandler, isClosed, isIsomorphicWith, notifyAdd, notifyDelete, queryHandler, size, toString, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetVersionfind, getDeductionsGraph, getGlobalProperty, getRawGraph, getReasoner, testGlobalProperty, validateclose, contains, contains, delete, dependsOn, find, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getStatisticsHandler, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, queryHandler, sizepublic LPBackwardRuleInfGraph(Reasoner reasoner, com.hp.hpl.jena.reasoner.rulesys.impl.LPRuleStore ruleStore, Graph data, Graph schema)
reasoner - the parent reasonerruleStore - the indexed set of rules to usedata - the data graph to be processedschema - optional precached schema (use null if not required)public Graph getSchemaGraph()
getSchemaGraph in class BaseInfGraphpublic void prepare()
prepare in interface InfGraphprepare in class BaseInfGraphpublic void rebind(Graph data)
rebind in interface InfGraphrebind in class BaseInfGraphdata - the new raw data graphpublic void rebind()
rebind in interface InfGraphrebind in class BaseInfGraphpublic void reset()
reset in interface InfGraphreset in class BaseInfGraphpublic com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> findWithContinuation(TriplePattern pattern, Finder continuation)
findWithContinuation in class BaseInfGraphpattern - a TriplePattern to be matched against the datacontinuation - either a Finder or a normal Graph which
will be asked for additional match results if the implementor
may not have completely satisfied the query.public com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> graphBaseFind(Node subject, Node property, Node object)
graphBaseFind in class BaseInfGraphpublic com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> find(TriplePattern pattern)
find in class BaseInfGraphpattern - a TriplePattern to be matched against the datapublic void performAdd(Triple t)
performAdd in interface com.hp.hpl.jena.graph.impl.GraphWithPerformperformAdd in class BaseInfGraphpublic void performDelete(Triple t)
performDelete in interface com.hp.hpl.jena.graph.impl.GraphWithPerformperformDelete in class BaseInfGraphpublic void setTabled(Node predicate)
public void setDerivationLogging(boolean recordDerivations)
setDerivationLogging in interface InfGraphsetDerivationLogging in class BaseInfGraphpublic Iterator<Derivation> getDerivation(Triple t)
getDerivation in interface InfGraphgetDerivation in class BaseInfGraphpublic void setTraceOn(boolean state)
public boolean isTraceOn()
public void logDerivation(Triple t, Derivation derivation)
logDerivation in interface BackwardRuleInfGraphIpublic com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> findDataMatches(TriplePattern pattern)
findDataMatches in interface BackwardRuleInfGraphIpublic boolean processBuiltin(ClauseEntry clause, Rule rule, BindingEnvironment env)
processBuiltin in interface BackwardRuleInfGraphIclause - the Functor representing the callenv - the BindingEnvironment for this callrule - the rule which is invoking this callpublic void silentAdd(Triple t)
silentAdd in interface SilentAddIpublic Node getTemp(Node instance, Node prop, Node pclass)
getTemp in interface BackwardRuleInfGraphIinstance - the base instance node to which the property appliesprop - the property node whose value is being inferredpclass - the (optional, can be null) class for the inferred value.Licenced under the Apache License, Version 2.0