Package org.emftrace.metamodel.RuleModel

Examples of org.emftrace.metamodel.RuleModel.LogicCondition


            tuples.get(0).get(0)[1] = c2;
            tuples.get(1).get(0)[0] = c3;
           
          Rule rule = RuleModelFactory.eINSTANCE.createRule();
         
          LogicCondition lc1 = RuleModelFactory.eINSTANCE.createLogicCondition();
          LogicCondition lc2 = RuleModelFactory.eINSTANCE.createLogicCondition();
         
          accessLayer.addElement(project, rule);
          accessLayer.addElement(project, lc1);
          accessLayer.addElement(project, lc2);
         
          rule.setConditions(lc1);
         
          BaseCondition bc1 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc2 = RuleModelFactory.eINSTANCE.createBaseCondition();
         
          accessLayer.addElement(project, bc1);
          accessLayer.addElement(project, bc2);
         
          lc1.getLogicConditions().add(lc2);
          lc1.getBaseConditions().add(bc1);
          lc2.getBaseConditions().add(bc2);
         
          assertNull(copy);
          copy = ConditionProcessorHelper.createDeepCopyOfTupleList(accessLayer, tuples, rule, lc2);
          assertNotNull(copy);
          assertEquals(2, copy.size());
View Full Code Here


          List<List<EObject[]>> tuples = new ArrayList<List<EObject[]>>();
          List<List<EObject[]>> copy   = new ArrayList<List<EObject[]>>();
         
          Rule rule = RuleModelFactory.eINSTANCE.createRule();
         
          LogicCondition lc1 = RuleModelFactory.eINSTANCE.createLogicCondition();
          LogicCondition lc2 = RuleModelFactory.eINSTANCE.createLogicCondition();
         
          accessLayer.addElement(project, rule);
          accessLayer.addElement(project, lc1);
          accessLayer.addElement(project, lc2);
         
          rule.setConditions(lc1);
         
          BaseCondition bc1 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc2 = RuleModelFactory.eINSTANCE.createBaseCondition();
         
          accessLayer.addElement(project, bc1);
          accessLayer.addElement(project, bc2);
         
          lc1.getLogicConditions().add(lc2);
          lc1.getBaseConditions().add(bc1);
          lc2.getBaseConditions().add(bc2);
         
          Concern c1 = URNModelFactory.eINSTANCE.createConcern();
            Concern c2 = URNModelFactory.eINSTANCE.createConcern();
            Concern c3 = URNModelFactory.eINSTANCE.createConcern();
            Concern c4 = URNModelFactory.eINSTANCE.createConcern();
View Full Code Here

     
          List<List<EObject[]>> tuples = new ArrayList<List<EObject[]>>();
         
          Rule rule = RuleModelFactory.eINSTANCE.createRule();
         
          LogicCondition logicCondition = RuleModelFactory.eINSTANCE.createLogicCondition();
         
          accessLayer.addElement(project, rule);
          accessLayer.addElement(project, logicCondition);
         
          rule.setConditions(logicCondition);
         
          BaseCondition bc1 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc2 = RuleModelFactory.eINSTANCE.createBaseCondition();
         
          accessLayer.addElement(project, bc1);
          accessLayer.addElement(project, bc2);
         
          logicCondition.getBaseConditions().add(bc1);
          logicCondition.getBaseConditions().add(bc2);
         
          assertTrue(tuples.isEmpty());
          ConditionProcessorHelper.prepareTupleLists(accessLayer, rule, tuples);
          assertEquals(2, tuples.size());
        return null;
View Full Code Here

           *  bc1
           *  bc2
           *  bc3
           * </AND>
           */
          LogicCondition lc = RuleModelFactory.eINSTANCE.createLogicCondition();
          BaseCondition bc1 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc2 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc3 = RuleModelFactory.eINSTANCE.createBaseCondition();
         
          rule.setConditions(lc);
          lc.getBaseConditions().add(bc1);
          lc.getBaseConditions().add(bc2);
          lc.getBaseConditions().add(bc3);
         
          List<BaseCondition> conditions = new ArrayList<BaseCondition>();
          conditions.add(bc1);
          conditions.add(bc2);
          conditions.add(bc3);
         
          ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
          ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
         
          rule.getElements().add(e1);
          rule.getElements().add(e2);
         
          // set all the attributes:
          e1.setAlias("e1");
          e2.setAlias("e2");
         
          lc.setType(LogicConditionType.AND);
          bc1.setSource("e1");
          bc2.setSource("e1");
          bc3.setSource("e1");
          bc1.setTarget("e2");
          bc2.setTarget("e2");
View Full Code Here

           * </AND>
           */
         
          Rule rule = RuleModelFactory.eINSTANCE.createRule();
         
          LogicCondition lc1 = RuleModelFactory.eINSTANCE.createLogicCondition();
          LogicCondition lc2 = RuleModelFactory.eINSTANCE.createLogicCondition();
         
          BaseCondition bc1 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc2 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc3 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc4 = RuleModelFactory.eINSTANCE.createBaseCondition();
         
          List<BaseCondition> conditions = new ArrayList<BaseCondition>();
          conditions.add(bc1);
          conditions.add(bc2);
          conditions.add(bc3);
          conditions.add(bc4);
         
          ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
          ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
          ElementDefinition e3 = RuleModelFactory.eINSTANCE.createElementDefinition();
         
          rule.getElements().add(e1);
          rule.getElements().add(e2);
          rule.getElements().add(e3);
         
          e1.setAlias("e1");
          e2.setAlias("e2");
          e3.setAlias("e3");
         
          rule.setConditions(lc1);
         
          lc1.setType(LogicConditionType.AND);
          lc2.setType(LogicConditionType.OR);
         
          lc1.getBaseConditions().add(bc1);
          lc1.getBaseConditions().add(bc2);
          lc2.getBaseConditions().add(bc3);
          lc2.getBaseConditions().add(bc4);
         
          lc1.getLogicConditions().add(lc2);
         
          bc1.setSource("e1");
          bc1.setTarget("e2");
View Full Code Here

           *  bc1
           *  bc2
           *  bc3
           * </OR>
           */
          LogicCondition lc = RuleModelFactory.eINSTANCE.createLogicCondition();
          BaseCondition bc1 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc2 = RuleModelFactory.eINSTANCE.createBaseCondition();
          BaseCondition bc3 = RuleModelFactory.eINSTANCE.createBaseCondition();
         
          rule.setConditions(lc);
          lc.getBaseConditions().add(bc1);
          lc.getBaseConditions().add(bc2);
          lc.getBaseConditions().add(bc3);
         
          List<BaseCondition> conditions = new ArrayList<BaseCondition>();
          conditions.add(bc1);
          conditions.add(bc2);
          conditions.add(bc3);
         
          ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
          ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
         
          rule.getElements().add(e1);
          rule.getElements().add(e2);
         
          // set all the attributes:
          e1.setAlias("e1");
          e2.setAlias("e2");
         
          lc.setType(LogicConditionType.OR);
          bc1.setSource("e1");
          bc2.setSource("e1");
          bc3.setSource("e1");
          bc1.setTarget("e2");
          bc2.setTarget("e2");
View Full Code Here

TOP

Related Classes of org.emftrace.metamodel.RuleModel.LogicCondition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.