-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from barnettwilliam/xmi-support-for-mdenet-educ…
…ation-platform XMI support for the MDENet Education Platform
- Loading branch information
Showing
14 changed files
with
161 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="ASCII"?> | ||
<Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns="tree" xmi:id="_o2PT0NP5Ee6c0fpM7dSnFg" label="Root"> | ||
<children xmi:id="_p5Q3ENP5Ee6c0fpM7dSnFg" label="A"/> | ||
</Node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="ASCII"?> | ||
<Node xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns="tree" xmi:id="_o2PT0NP5Ee6c0fpM7dSnFg" label="Root"> | ||
<children xmi:id="_p5Q3ENP5Ee6c0fpM7dSnFh" label="B"/> | ||
</Node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// We match persons by name | ||
rule NodeWithNode | ||
match l : Left!Node | ||
with r : Right!Node { | ||
|
||
compare: l.label = r.label | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@namespace(uri="tree", prefix="") | ||
package tree; | ||
|
||
class Node { | ||
attr String label; | ||
val Node[*] children; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
rule NodeWithNode | ||
merge l: Left!Node | ||
with r: Right!Node | ||
into m: Merged!Node { | ||
m.label = l.label; | ||
|
||
var mergedChildren: Set; | ||
mergedChildren.addAll(l.children.equivalent()); | ||
mergedChildren.addAll(r.children.equivalent()); | ||
m.children.addAll(mergedChildren); | ||
} | ||
|
||
rule NodeFromNode | ||
transform s: Source!Node | ||
to t: Target!Node | ||
{ | ||
t.label = s.label; | ||
t.children ::= s.children; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters