Search in sources :

Example 11 with CEPWindow

use of org.drools.workbench.models.datamodel.rule.CEPWindow in project drools-wb by kiegroup.

the class RuleModelCloneVisitor method visitFactPattern.

private FactPattern visitFactPattern(FactPattern pattern) {
    FactPattern clone = new FactPattern();
    clone.setBoundName(pattern.getBoundName());
    clone.setFactType(pattern.getFactType());
    clone.setNegated(pattern.isNegated());
    CEPWindow cloneCEPWindow = new CEPWindow();
    cloneCEPWindow.setOperator(pattern.getWindow().getOperator());
    cloneCEPWindow.setParameters(cloneCEPWindowParameters(pattern.getWindow()));
    clone.setWindow(cloneCEPWindow);
    for (FieldConstraint fc : pattern.getFieldConstraints()) {
        clone.addConstraint((FieldConstraint) visit(fc));
    }
    return clone;
}
Also used : CEPWindow(org.drools.workbench.models.datamodel.rule.CEPWindow) IFactPattern(org.drools.workbench.models.datamodel.rule.IFactPattern) FactPattern(org.drools.workbench.models.datamodel.rule.FactPattern) FromAccumulateCompositeFactPattern(org.drools.workbench.models.datamodel.rule.FromAccumulateCompositeFactPattern) CompositeFactPattern(org.drools.workbench.models.datamodel.rule.CompositeFactPattern) FromCompositeFactPattern(org.drools.workbench.models.datamodel.rule.FromCompositeFactPattern) FromCollectCompositeFactPattern(org.drools.workbench.models.datamodel.rule.FromCollectCompositeFactPattern) CompositeFieldConstraint(org.drools.workbench.models.datamodel.rule.CompositeFieldConstraint) SingleFieldConstraint(org.drools.workbench.models.datamodel.rule.SingleFieldConstraint) FieldConstraint(org.drools.workbench.models.datamodel.rule.FieldConstraint)

Aggregations

CEPWindow (org.drools.workbench.models.datamodel.rule.CEPWindow)11 CompositeFactPattern (org.drools.workbench.models.datamodel.rule.CompositeFactPattern)7 FactPattern (org.drools.workbench.models.datamodel.rule.FactPattern)7 FromAccumulateCompositeFactPattern (org.drools.workbench.models.datamodel.rule.FromAccumulateCompositeFactPattern)7 FromCollectCompositeFactPattern (org.drools.workbench.models.datamodel.rule.FromCollectCompositeFactPattern)7 FromCompositeFactPattern (org.drools.workbench.models.datamodel.rule.FromCompositeFactPattern)7 Test (org.junit.Test)6 RuleModel (org.drools.workbench.models.datamodel.rule.RuleModel)4 IFactPattern (org.drools.workbench.models.datamodel.rule.IFactPattern)3 CompositeFieldConstraint (org.drools.workbench.models.datamodel.rule.CompositeFieldConstraint)2 FieldConstraint (org.drools.workbench.models.datamodel.rule.FieldConstraint)2 IPattern (org.drools.workbench.models.datamodel.rule.IPattern)2 SingleFieldConstraint (org.drools.workbench.models.datamodel.rule.SingleFieldConstraint)2 BehaviorDescr (org.drools.compiler.lang.descr.BehaviorDescr)1 BaseSingleFieldConstraint (org.drools.workbench.models.datamodel.rule.BaseSingleFieldConstraint)1 ConnectiveConstraint (org.drools.workbench.models.datamodel.rule.ConnectiveConstraint)1 FromEntryPointFactPattern (org.drools.workbench.models.datamodel.rule.FromEntryPointFactPattern)1 Pattern52 (org.drools.workbench.models.guided.dtable.shared.model.Pattern52)1 CEPWindowOperatorsDropdown (org.drools.workbench.screens.guided.rule.client.editor.CEPWindowOperatorsDropdown)1 Before (org.junit.Before)1