public class LPRuleStore extends RuleStore
Constructor and Description |
---|
LPRuleStore()
Construct an empty rule store
|
LPRuleStore(List<Rule> rules)
Construct a rule store containing the given rules.
|
Modifier and Type | Method and Description |
---|---|
void |
addAll(LPRuleStore store)
Add all the rules and tabling instructions from an existing rulestore into this one.
|
List<RuleClauseCode> |
codeFor(Node predicate)
Return an ordered list of RuleClauseCode objects to implement the given
predicate.
|
List<RuleClauseCode> |
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 |
isTabled(Node predicate)
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 predictes 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 predictes exist.
|
void |
tablePredicate(Node predicate)
Register an RDF predicate as one whose presence in a goal should force
the goal to be tabled.
|
addAll, addRule, deleteAllRules, deleteRule, getAllRules, rulesFor
public LPRuleStore(List<Rule> rules)
rules
- the rules to initialize the store with.public LPRuleStore()
public void addAll(LPRuleStore store)
public void tablePredicate(Node predicate)
public List<RuleClauseCode> codeFor(Node predicate)
predicate
- the predicate node or Node_RuleVariable.WILD for wildcards.public List<RuleClauseCode> codeFor(TriplePattern goal)
goal
- the triple pattern that makes up the querypublic boolean isIndexedPredicate(Node predicate)
public boolean isTabled(TriplePattern goal)
public boolean isTabled(Node predicate)
Licenced under the Apache License, Version 2.0