use of org.drools.drl.parser.DrlExprParser in project drools by kiegroup.
the class DescrDumper method processConstraint.
private void processConstraint(StringBuilder sbuilder, ExprConstraintDescr base, boolean isInsideRelCons, DumperContext context) {
DrlExprParser expr = new DrlExprParser(context.getRuleContext().getConfiguration().getLanguageLevel());
ConstraintConnectiveDescr result = expr.parse(base.getExpression());
if (result.getDescrs().size() == 1) {
dump(sbuilder, result.getDescrs().get(0), 0, isInsideRelCons, context);
} else {
dump(sbuilder, result, 0, isInsideRelCons, context);
}
}
use of org.drools.drl.parser.DrlExprParser in project drools by kiegroup.
the class ExprConstraintDescrVisitor method visit.
public void visit(ExprConstraintDescr descr) {
DrlExprParser drlExprParser = new DrlExprParser(LanguageLevelOption.DRL5);
ConstraintConnectiveDescr constraintConnectiveDescr = drlExprParser.parse(descr.getExpression());
visit(constraintConnectiveDescr.getDescrs());
}
Aggregations