public class RuleEngine extends Object
Constructor and Description |
---|
RuleEngine(RuleBase rules) |
Modifier and Type | Method and Description |
---|---|
String |
evaluate(Query query,
int traceLevel)
Evaluates a rule base over a query
|
private boolean |
matchRule(Evaluation evaluation,
ProductionRule rule)
Matches a rule at the current starting point of the evaluation, and carries
out the production if there is a match
|
private boolean |
matchRuleAtAllStartPoints(Evaluation evaluation,
ProductionRule rule)
Match a rule at any starting point in the query
|
private RuleBase rules
public RuleEngine(RuleBase rules)
public String evaluate(Query query, int traceLevel)
query
- the query to evaluatetraceLevel
- the level of tracing to doprivate boolean matchRuleAtAllStartPoints(Evaluation evaluation, ProductionRule rule)
private boolean matchRule(Evaluation evaluation, ProductionRule rule)
Copyright © 2018. All rights reserved.