Class RuleStore
- java.lang.Object
-
- org.apache.jena.reasoner.rulesys.impl.RuleStore
-
- Direct Known Subclasses:
LPRuleStore
public class RuleStore extends java.lang.Object
Indexes a collection of rule. The currently implementation is a crude first version aimed at supporting the backchaining interpreter. It only indexes on predicate.The rules are normalized to only contain a single head element by duplicating any multi headed rules.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAll(RuleStore store)
Add all the rules and from an existing rulestore into this one.void
addRule(Rule rule)
Add a single rule to the store.void
deleteAllRules()
Delete all the rules.void
deleteRule(Rule rule)
Remove a single rule from the storejava.util.List<Rule>
getAllRules()
Return an ordered list of all registered rules.java.util.List<Rule>
rulesFor(TriplePattern goal)
Return a list of rules that match the given goal pattern
-
-
-
Constructor Detail
-
RuleStore
public RuleStore()
Constructor. Create an empty rule store.
-
RuleStore
public RuleStore(java.util.List<Rule> rules)
Constructor. Stores and indexes a list of rules.
-
-
Method Detail
-
addAll
public void addAll(RuleStore store)
Add all the rules and from an existing rulestore into this one.
-
addRule
public void addRule(Rule rule)
Add a single rule to the store.
-
deleteRule
public void deleteRule(Rule rule)
Remove a single rule from the store
-
rulesFor
public java.util.List<Rule> rulesFor(TriplePattern goal)
Return a list of rules that match the given goal pattern- Parameters:
goal
- the goal being matched
-
getAllRules
public java.util.List<Rule> getAllRules()
Return an ordered list of all registered rules.
-
deleteAllRules
public void deleteAllRules()
Delete all the rules.
-
-