Package org.emftrace.metamodel.RuleModel

Examples of org.emftrace.metamodel.RuleModel.ElementDefinition


      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");
View Full Code Here


     
      List<BaseCondition> conditions = new ArrayList<BaseCondition>();
      conditions.add(bc1);
      conditions.add(bc2);
     
      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");
     
      List<EObject[]> finalTuples   = new ArrayList<EObject[]>();
      List<EObject[]> currentTuples = new ArrayList<EObject[]>();
     
      Concern c1 = URNModelFactory.eINSTANCE.createConcern();
View Full Code Here

      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);
View Full Code Here

     
      List<BaseCondition> conditions = new ArrayList<BaseCondition>();
      conditions.add(bc1);
      conditions.add(bc2);
     
      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");
     
      List<EObject[]> finalTuples   = new ArrayList<EObject[]>();
      List<EObject[]> currentTuples = new ArrayList<EObject[]>();
     
      Concern c1 = URNModelFactory.eINSTANCE.createConcern();
View Full Code Here

      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");
View Full Code Here

     
      List<BaseCondition> conditions = new ArrayList<BaseCondition>();
      conditions.add(bc1);
      conditions.add(bc2);
     
      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);
     
      // set all the attributes:
      e1.setAlias("e1");
      e2.setAlias("e2");
      e3.setAlias("e3");
     
      List<EObject[]> finalTuples   = new ArrayList<EObject[]>();
      List<EObject[]> currentTuples = new ArrayList<EObject[]>();
     
      Concern c1 = URNModelFactory.eINSTANCE.createConcern();
View Full Code Here

    @Test
    public void testRemoveOutdatedTuples()
    {
      Rule rule = RuleModelFactory.eINSTANCE.createRule();
     
      ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
      ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
     
      e1.setAlias("e1");
      e2.setAlias("e2");
     
      rule.getElements().add(e1);
      rule.getElements().add(e2);
     
      BaseCondition condition = RuleModelFactory.eINSTANCE.createBaseCondition();
View Full Code Here

      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();
     
      ActionDefinition a = RuleModelFactory.eINSTANCE.createActionDefinition();
      a.setActionType(ActionType.CREATE_LINK);
       
      rule.getElements().add(e1);
      rule.getElements().add(e2);
      rule.getElements().add(e3);
     
      rule.getActions().add(a);
     
      e1.setAlias("e1");
      e2.setAlias("e2");
      e3.setAlias("e3");
     
      rule.setConditions(lc1);
     
      lc1.setType(LogicConditionType.AND);
      lc2.setType(LogicConditionType.OR);
View Full Code Here

{       
    @Test
    public void testGetIndexForElement()
    {
        Rule rule = RuleModelFactory.eINSTANCE.createRule();     
        ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
        ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
       
        rule.getElements().add(e1);
        rule.getElements().add(e2);
       
        e1.setAlias("number_1");
        e2.setAlias("number_2");
       
        assertEquals(0, ElementResolver.getIndexForElement(rule, "number_1"));
        assertEquals(1, ElementResolver.getIndexForElement(rule, "number_2"));
    }
View Full Code Here

      Rule impactRule2 = RuleModelFactory.eINSTANCE.createRule();
     
      accessLayer.addElement(project, impactRule1);
      accessLayer.addElement(project, impactRule2);
     
      ElementDefinition rule1ED1 = RuleModelFactory.eINSTANCE.createElementDefinition();
      ElementDefinition rule1ED2 = RuleModelFactory.eINSTANCE.createElementDefinition();
      ElementDefinition rule1ED3 = RuleModelFactory.eINSTANCE.createElementDefinition();
      ElementDefinition rule2ED1 = RuleModelFactory.eINSTANCE.createElementDefinition();
      ElementDefinition rule2ED2 = RuleModelFactory.eINSTANCE.createElementDefinition();
      ElementDefinition rule2ED3 = RuleModelFactory.eINSTANCE.createElementDefinition();
     
      accessLayer.addElement(project, rule1ED1);
      accessLayer.addElement(project, rule1ED2);
      accessLayer.addElement(project, rule1ED3);
      accessLayer.addElement(project, rule2ED1);
      accessLayer.addElement(project, rule2ED2);
      accessLayer.addElement(project, rule2ED3);
     
      rule1ED1.setType("Concern");
      rule1ED1.setAlias("e1");
      rule1ED2.setType("Concern");
      rule1ED2.setAlias("e2");
      rule1ED3.setType("AtomicChangeType");
      rule1ED3.setAlias("e3");
     
      rule2ED1.setType("Concern");
      rule2ED1.setAlias("e1");
      rule2ED2.setType("Concern");
      rule2ED2.setAlias("e2");
      rule2ED3.setType("AtomicChangeType");
      rule2ED3.setAlias("e3");
     
      impactRule1.getElements().add(rule1ED1);
      impactRule1.getElements().add(rule1ED2);
      impactRule1.getElements().add(rule1ED3);
     
View Full Code Here

TOP

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

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.