From 22cb143e34078fdda151c4c7c267f1237e1b6e1d Mon Sep 17 00:00:00 2001 From: Kevin Kassin <kevinkassin@gmx.de> Date: Sun, 10 Sep 2017 20:59:05 +0200 Subject: [PATCH] Commit 10.9 20:45 fixed transformation script for new models, transformation now works completly --- .../epsilon/CompartmentType.etl | 9 --------- org.framed.orm.transformation/epsilon/Relationship.etl | 4 ++-- .../epsilon/RelationshipExclusion.etl | 7 +++---- .../epsilon/RelationshipImplication.etl | 6 ++---- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/org.framed.orm.transformation/epsilon/CompartmentType.etl b/org.framed.orm.transformation/epsilon/CompartmentType.etl index 0b60f6eb..95b03482 100644 --- a/org.framed.orm.transformation/epsilon/CompartmentType.etl +++ b/org.framed.orm.transformation/epsilon/CompartmentType.etl @@ -51,15 +51,6 @@ rule CompartmentType n.getContains.add(e); if(not(t.~features.get("Contains_Compartments"))) n.getContains.remove(e); } else if (e.instanceOf(target!RelationshipImplication) or e.instanceOf(target!RelationshipExclusion)) { // INTER_RELATIONSHIP_CONSTRAINT - for (rst : source!Relation in children.elements){ - if (rst.getType.getValue == 7){ // RELATIONSHIP - //Discover source and target Relationships of the inter relationship constraint - if (rst.connectionAnchor == elem.source) - e.first = rst.equivalent(); - if (rst.connectionAnchor == elem.target) - e.second = rst.equivalent(); - } - } n.getConstraints().add(e); //add CONSTRAINTS as well } else if ( e.instanceOf(target!Constraint)) { // CONSTRAINT n.getConstraints().add(e); diff --git a/org.framed.orm.transformation/epsilon/Relationship.etl b/org.framed.orm.transformation/epsilon/Relationship.etl index 8c001616..6f77789a 100644 --- a/org.framed.orm.transformation/epsilon/Relationship.etl +++ b/org.framed.orm.transformation/epsilon/Relationship.etl @@ -105,7 +105,7 @@ rule AcyclicRelation transform s : source!Relation to t : target!Acyclic { - guard : s.getType.getValue == 17 and s.~features.get("Intra_Relationship_Constraints") + guard : s.getType.getValue == 16 and s.~features.get("Intra_Relationship_Constraints") } @@ -114,6 +114,6 @@ rule ReflexiveRelation transform s : source!Relation to t : target!Reflexive { - guard : s.getType.getValue == 18 and s.~features.get("Intra_Relationship_Constraints") + guard : s.getType.getValue == 17 and s.~features.get("Intra_Relationship_Constraints") } \ No newline at end of file diff --git a/org.framed.orm.transformation/epsilon/RelationshipExclusion.etl b/org.framed.orm.transformation/epsilon/RelationshipExclusion.etl index 17769b91..db15d0f1 100644 --- a/org.framed.orm.transformation/epsilon/RelationshipExclusion.etl +++ b/org.framed.orm.transformation/epsilon/RelationshipExclusion.etl @@ -3,9 +3,8 @@ rule RelationshipExclusion transform s : source!Relation to t : target!RelationshipExclusion { - guard : s.getType.getValue == 19 and s.~features.get("Inter_Relationship_Constraints") // enum value RelationshipExclusion + guard : s.getType.getValue == 18 and s.~features.get("Inter_Relationship_Constraints") // enum value RelationshipExclusion - //does not work as RelationshipShapeChild has no ref to the actual Relationship - //t.first ::= s.source; - //t.second ::= s.target; + t.first ::= s.source; + t.second ::= s.target; } \ No newline at end of file diff --git a/org.framed.orm.transformation/epsilon/RelationshipImplication.etl b/org.framed.orm.transformation/epsilon/RelationshipImplication.etl index cbbf10a7..bf353e78 100644 --- a/org.framed.orm.transformation/epsilon/RelationshipImplication.etl +++ b/org.framed.orm.transformation/epsilon/RelationshipImplication.etl @@ -5,8 +5,6 @@ rule RelationshipImplication guard : s.getType.getValue == 15 and s.~features.get("Inter_Relationship_Constraints") // enum value RelationshipImplication - - //does not work as RelationshipShapeChild has no ref to the actual Relationship - //t.first = s.source.equivalent(); - //t.second = s.target.equivalent(); + t.first = s.source.equivalent(); + t.second = s.target.equivalent(); } \ No newline at end of file -- GitLab