java.lang.Object
org.apache.jena.reasoner.rulesys.impl.RuleStore
org.apache.jena.reasoner.rulesys.impl.LPRuleStore
Holds the set of backward rules used by an LPEngine. Is responsible
for compile the rules into internal byte codes before use.
-
Constructor Summary
ConstructorDescriptionConstruct an empty rule storeLPRuleStore
(List<Rule> rules) Construct a rule store containing the given rules. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAll
(LPRuleStore store) Add all the rules and tabling instructions from an existing rulestore into this one.Return an ordered list of RuleClauseCode objects to implement the given predicate.codeFor
(TriplePattern goal) Return an ordered list of RuleClauseCode objects to implement the given query pattern.boolean
isIndexedPredicate
(Node predicate) Return true if the given predicate is indexed.boolean
Return true if the given predicated is tabled, currently this is true if the predicate is a tabled predicate or the predicate is a wildcard and some tabled predicates exist.boolean
isTabled
(TriplePattern goal) Return true if the given goal is tabled, currently this is true if the predicate is a tabled predicate or the predicate is a wildcard and some tabled predicates exist.void
tablePredicate
(Node predicate) Register an RDF predicate as one whose presence in a goal should force the goal to be tabled.Methods inherited from class org.apache.jena.reasoner.rulesys.impl.RuleStore
addAll, addRule, deleteAllRules, deleteRule, getAllRules, rulesFor
-
Constructor Details
-
LPRuleStore
Construct a rule store containing the given rules.- Parameters:
rules
- the rules to initialize the store with.
-
LPRuleStore
public LPRuleStore()Construct an empty rule store
-
-
Method Details
-
addAll
Add all the rules and tabling instructions from an existing rulestore into this one. -
tablePredicate
Register an RDF predicate as one whose presence in a goal should force the goal to be tabled. -
codeFor
Return an ordered list of RuleClauseCode objects to implement the given predicate.- Parameters:
predicate
- the predicate node or Node_RuleVariable.WILD for wildcards.
-
codeFor
Return an ordered list of RuleClauseCode objects to implement the given query pattern. This may use indexing to narrow the rule set more that the predicate-only case.- Parameters:
goal
- the triple pattern that makes up the query
-
isIndexedPredicate
Return true if the given predicate is indexed. -
isTabled
Return true if the given goal is tabled, currently this is true if the predicate is a tabled predicate or the predicate is a wildcard and some tabled predicates exist. -
isTabled
Return true if the given predicated is tabled, currently this is true if the predicate is a tabled predicate or the predicate is a wildcard and some tabled predicates exist.
-