Skip to content
Snippets Groups Projects
Commit 22cb143e authored by Kevin Kassin's avatar Kevin Kassin
Browse files

Commit 10.9 20:45

fixed transformation script for new models,
transformation now works completly
parent b1c789e9
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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
......@@ -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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment