java.lang.Object
org.apache.jena.graph.impl.GraphBase
org.apache.jena.reasoner.BaseInfGraph
org.apache.jena.reasoner.rulesys.BasicForwardRuleInfGraph
org.apache.jena.reasoner.rulesys.RETERuleInfGraph
- All Implemented Interfaces:
Graph
,GraphWithPerform
,InfGraph
,ForwardRuleInfGraphI
,SilentAddI
RETE implementation of the forward rule inference graph.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.reasoner.BaseInfGraph
BaseInfGraph.InfCapabilities, BaseInfGraph.InfFindSafeCapabilities, BaseInfGraph.InfTransactionHandler
-
Field Summary
Fields inherited from class org.apache.jena.reasoner.rulesys.BasicForwardRuleInfGraph
filterFunctors
Fields inherited from class org.apache.jena.graph.impl.GraphBase
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT
Fields inherited from interface org.apache.jena.graph.Graph
emptyGraph
-
Constructor Summary
ConstructorsConstructorDescriptionRETERuleInfGraph
(Reasoner reasoner, List<Rule> rules, Graph schema) Constructor.Constructor.RETERuleInfGraph
(Reasoner reasoner, Graph schema) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Removes the triple t (if possible) from the set belonging to this graph.Methods inherited from class org.apache.jena.reasoner.rulesys.BasicForwardRuleInfGraph
addBRule, addDeduction, close, deleteBRule, find, findDataMatches, findWithContinuation, getCurrentDeductionsGraph, getDeductionsGraph, getDerivation, getNRulesFired, getSchemaGraph, graphBaseSize, logDerivation, prepare, rebind, rebind, setDerivationLogging, setFunctorFiltering, setRuleStore, setTraceOn, shouldLogDerivations, shouldTrace, silentAdd
Methods inherited from class org.apache.jena.reasoner.BaseInfGraph
clear, cloneWithPremises, find, getCapabilities, getGlobalProperty, getPrefixMapping, getRawGraph, getReasoner, getTransactionHandler, getVersion, isEmpty, isPrepared, remove, reset, testGlobalProperty, validate
Methods inherited from class org.apache.jena.graph.impl.GraphBase
add, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, isClosed, isIsomorphicWith, notifyAdd, notifyDelete, size, toString, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.jena.graph.Graph
add, add, clear, contains, contains, delete, delete, dependsOn, find, find, find, getCapabilities, getEventManager, getPrefixMapping, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, remove, size, stream, stream
Methods inherited from interface org.apache.jena.reasoner.InfGraph
find, getGlobalProperty, getRawGraph, getReasoner, reset, testGlobalProperty, validate
-
Constructor Details
-
RETERuleInfGraph
Constructor. Creates a new inference graph to which a (compiled) rule set and a data graph can be attached. This separation of binding is useful to allow any configuration parameters (such as logging) to be set before the data is added. Note that until the data is added usingrebind
then any operations like add, remove, find will result in errors.- Parameters:
reasoner
- the parent reasonerschema
- the (optional) schema data which is being processed
-
RETERuleInfGraph
Constructor. Creates a new inference graph based on the given rule set. No data graph is attached at this stage. This is to allow any configuration parameters (such as logging) to be set before the data is added. Note that until the data is added usingrebind
then any operations like add, remove, find will result in errors.- Parameters:
reasoner
- the parent reasonerrules
- the list of rules to use this timeschema
- the (optional) schema or preload data which is being processed
-
RETERuleInfGraph
Constructor. Creates a new inference graph based on the given rule set then processes the initial data graph. No precomputed deductions are loaded.- Parameters:
reasoner
- the parent reasonerrules
- the list of rules to use this timeschema
- the (optional) schema or preload data which is being processeddata
- the data graph to be processed
-
-
Method Details
-
performAdd
Add one triple to the data graph, run any rules triggered by the new data item, recursively adding any generated triples.- Specified by:
performAdd
in interfaceGraphWithPerform
- Overrides:
performAdd
in classBasicForwardRuleInfGraph
-
performDelete
Removes the triple t (if possible) from the set belonging to this graph.- Specified by:
performDelete
in interfaceGraphWithPerform
- Overrides:
performDelete
in classBasicForwardRuleInfGraph
-