use of org.drools.verifier.components.PatternOperatorDescr in project drools by kiegroup.
the class PatternDescrVisitor method visitOrDescr.
@Override
protected void visitOrDescr(OrDescr descr) throws UnknownDescriptionException {
PatternOperatorDescr operatorDescr = new PatternOperatorDescr(pattern, OperatorDescrType.OR);
operatorDescr.setOrderNumber(orderNumber.next());
data.add(operatorDescr);
solvers.startOperator(OperatorDescrType.OR);
visit(descr.getDescrs());
solvers.endOperator();
}
use of org.drools.verifier.components.PatternOperatorDescr in project drools by kiegroup.
the class PatternDescrVisitor method visitAndDescr.
@Override
protected void visitAndDescr(AndDescr descr) throws UnknownDescriptionException {
PatternOperatorDescr operatorDescr = new PatternOperatorDescr(pattern, OperatorDescrType.AND);
operatorDescr.setOrderNumber(orderNumber.next());
operatorDescr.setParentPath(getParent().getPath());
operatorDescr.setParentType(getParent().getVerifierComponentType());
data.add(operatorDescr);
solvers.startOperator(OperatorDescrType.AND);
visit(descr.getDescrs());
solvers.endOperator();
}
use of org.drools.verifier.components.PatternOperatorDescr in project drools by kiegroup.
the class VerifierDataMapsTest method testSaveVerifierComponentAndGetForAllComponentTypes.
@Test
public void testSaveVerifierComponentAndGetForAllComponentTypes() {
RulePackage rulePackage = VerifierComponentMockFactory.createPackage1();
saveVerifierComponentAndGet(rulePackage);
VerifierRule rule = VerifierComponentMockFactory.createRule1();
saveVerifierComponentAndGet(rule);
Pattern pattern = VerifierComponentMockFactory.createPattern1();
saveVerifierComponentAndGet(pattern);
saveVerifierComponentAndGet(new InlineEvalDescr(pattern));
saveVerifierComponentAndGet(new ObjectType(new PackageDescr("testPackage1")));
saveVerifierComponentAndGet(new RuleOperatorDescr(new AndDescr(), rule, OperatorDescrType.AND));
saveVerifierComponentAndGet(new PatternOperatorDescr(pattern, OperatorDescrType.AND));
saveVerifierComponentAndGet(new SubPattern(pattern, 0));
saveVerifierComponentAndGet(new ReturnValueFieldDescr(pattern));
saveVerifierComponentAndGet(new SubRule(rule, 0));
saveVerifierComponentAndGet(new TextConsequence(rule));
saveVerifierComponentAndGet(new PatternVariable(rule));
saveVerifierComponentAndGet(new VerifierAccessorDescr(rule));
saveVerifierComponentAndGet(new VerifierAccumulateDescr(pattern));
saveVerifierComponentAndGet(new VerifierCollectDescr(pattern));
saveVerifierComponentAndGet(new RuleEval(rule));
saveVerifierComponentAndGet(new VerifierFieldAccessDescr(rule));
saveVerifierComponentAndGet(new VerifierFromDescr(pattern));
saveVerifierComponentAndGet(new VerifierMethodAccessDescr(rule));
saveVerifierComponentAndGet(new PatternEval(pattern));
}
Aggregations