Package org.emftrace.metamodel.RuleModel

Examples of org.emftrace.metamodel.RuleModel.ElementDefinition


            models.add(link);
           
            Rule rule = RuleModelFactory.eINSTANCE.createRule();
            accessLayer.addElement(project, rule);
           
            ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
            accessLayer.addElement(project, e1);
            e1.setType("TraceLink");
            rule.getElements().add(e1);
           
            assertEquals(1, results.size());
            assertEquals(0, results.get(0).size());
            elementProcessor.retrieveElements(project, rule, models, results);
            assertEquals(1, results.size());
            assertEquals(1, results.get(0).size());
            assertSame(link, results.get(0).get(0));
           
            Actor actor = URNModelFactory.eINSTANCE.createActor();
            accessLayer.addElement(project, actor);
            models.add(actor);
            results.get(0).clear();
            e1.setType("*");
           
            assertEquals(1, results.size());
            assertEquals(0, results.get(0).size());
            elementProcessor.retrieveElements(project, rule, models, results);
            assertEquals(1, results.size());
            assertEquals(2, results.get(0).size());
           
            results.get(0).clear();
            e1.setType("Actor");
           
            assertEquals(1, results.size());
            assertEquals(0, results.get(0).size());
            elementProcessor.retrieveElements(project, rule, models, results);
            assertEquals(1, results.size());
            assertEquals(1, results.get(0).size());
            assertSame(actor, results.get(0).get(0));
           
            results.get(0).clear();
            e1.setType("TraceLink|Actor");
           
            assertEquals(1, results.size());
            assertEquals(0, results.get(0).size());
            elementProcessor.retrieveElements(project, rule, models, results);
            assertEquals(1, results.size());
View Full Code Here


    public void testFindElementsForDeletion()
    {
        Rule rule = RuleModelFactory.eINSTANCE.createRule();
        LogicCondition logicCondition = RuleModelFactory.eINSTANCE.createLogicCondition();
        BaseCondition baseCondition = RuleModelFactory.eINSTANCE.createBaseCondition();
        ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
        ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
        e1.setAlias("e1");
        e2.setAlias("e2");
       
        rule.getElements().add(e1);
        rule.getElements().add(e2);
              
        rule.setConditions(logicCondition);
View Full Code Here

      @Override
      public Void call() throws Exception
      {
            Rule rule = RuleModelFactory.eINSTANCE.createRule();
            accessLayer.addElement(project, rule);
            ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
            accessLayer.addElement(project, e1);
            e1.setType("TraceLink");
            e1.setAlias("e1");
            ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
            accessLayer.addElement(project, e2);
            e2.setType("Concern");
            e2.setAlias("e2");
            rule.getElements().add(e1);
            rule.getElements().add(e2);
            TraceLink link = LinkModelFactory.eINSTANCE.createTraceLink();
            accessLayer.addElement(project, link);
            Concern concern = URNModelFactory.eINSTANCE.createConcern();
View Full Code Here

        l2.get(1).add(c2);
       
        Rule rule = RuleModelFactory.eINSTANCE.createRule();
        LogicCondition logicCondition = RuleModelFactory.eINSTANCE.createLogicCondition();
        BaseCondition baseCondition = RuleModelFactory.eINSTANCE.createBaseCondition();
        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.setSource("e2");
View Full Code Here

      @Override
      public Void call() throws Exception
      {
            Rule rule = RuleModelFactory.eINSTANCE.createRule();
            accessLayer.addElement(project, rule);
            ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
            accessLayer.addElement(project, e1);
            e1.setType("TraceLink");
            e1.setAlias("e1");
            ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
            accessLayer.addElement(project, e2);
            e2.setType("Concern");
            e2.setAlias("e2");
            rule.getElements().add(e1);
            rule.getElements().add(e2);
            TraceLink link = LinkModelFactory.eINSTANCE.createTraceLink();
            accessLayer.addElement(project, link);
            Concern concern = 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.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

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.