rgen 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +5 -1
- data/lib/rgen/serializer/xmi11_serializer.rb +51 -35
- data/test/ea_serializer_test/ea_testmodel_regenerated.xml +569 -569
- data/test/metamodel_roundtrip_test/TestModel_Regenerated.rb +33 -31
- data/test/metamodel_roundtrip_test/houseMetamodel_Regenerated.ecore +33 -33
- metadata +2 -2
@@ -6,54 +6,56 @@ module HouseMetamodel
|
|
6
6
|
|
7
7
|
SexEnum = Enum.new(:name => 'SexEnum', :literals =>[ :male, :female ])
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
class Person < RGen::MetamodelBuilder::MMBase
|
10
|
+
annotation 'complexity' => '1', 'date_created' => '2006-06-27 08:34:23', 'date_modified' => '2006-06-27 08:34:26', 'ea_ntype' => '0', 'ea_stype' => 'Class', 'gentype' => 'Java', 'isSpecification' => 'false', 'package' => 'EAPK_A1B83D59_CAE1_422c_BA5F_D3624D7156AD', 'package_name' => 'HouseMetamodel', 'phase' => '1.0', 'status' => 'Proposed', 'style' => 'BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;', 'tagged' => '0', 'version' => '1.0'
|
11
|
+
has_attr 'sex', HouseMetamodel::SexEnum
|
12
|
+
end
|
13
|
+
|
14
|
+
class MeetingPlace < RGen::MetamodelBuilder::MMBase
|
15
|
+
annotation :source => "testmodel", :details => {'complexity' => '1', 'date_created' => '2006-07-12 08:40:46', 'date_modified' => '2006-07-12 08:44:02', 'ea_ntype' => '0', 'ea_stype' => 'Class', 'gentype' => 'Java', 'isSpecification' => 'false', 'package' => 'EAPK_A1B83D59_CAE1_422c_BA5F_D3624D7156AD', 'package_name' => 'HouseMetamodel', 'phase' => '1.0', 'status' => 'Proposed', 'style' => 'BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;', 'tagged' => '0', 'version' => '1.0'}
|
16
|
+
end
|
12
17
|
|
18
|
+
class House < RGen::MetamodelBuilder::MMBase
|
19
|
+
annotation 'complexity' => '1', 'date_created' => '2005-09-16 19:52:18', 'date_modified' => '2006-02-28 08:29:19', 'ea_ntype' => '0', 'ea_stype' => 'Class', 'gentype' => 'Java', 'isSpecification' => 'false', 'package' => 'EAPK_A1B83D59_CAE1_422c_BA5F_D3624D7156AD', 'package_name' => 'HouseMetamodel', 'phase' => '1.0', 'status' => 'Proposed', 'stereotype' => 'dummy', 'style' => 'BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;', 'tagged' => '0', 'version' => '1.0'
|
20
|
+
has_attr 'size', Integer
|
21
|
+
has_attr 'module', String
|
22
|
+
has_attr 'address', String, :changeable => false do
|
23
|
+
annotation 'collection' => 'false', 'containment' => 'Not Specified', 'derived' => '0', 'duplicates' => '0', 'ea_guid' => '{A8DF581B-9AC6-4f75-AB48-8FAEDFC6E068}', 'lowerBound' => '1', 'ordered' => '0', 'position' => '0', 'styleex' => 'volatile=0;', 'type' => 'String', 'upperBound' => '1'
|
24
|
+
end
|
13
25
|
end
|
14
26
|
|
27
|
+
|
15
28
|
module Rooms
|
16
29
|
extend RGen::MetamodelBuilder::ModuleExtension
|
17
30
|
include RGen::MetamodelBuilder::DataTypes
|
18
31
|
|
19
|
-
end
|
20
|
-
end
|
21
32
|
|
22
|
-
class
|
23
|
-
|
24
|
-
|
33
|
+
class Room < RGen::MetamodelBuilder::MMBase
|
34
|
+
abstract
|
35
|
+
annotation 'complexity' => '1', 'date_created' => '2005-09-16 19:52:28', 'date_modified' => '2006-06-22 21:15:25', 'ea_ntype' => '0', 'ea_stype' => 'Class', 'gentype' => 'Java', 'isSpecification' => 'false', 'package' => 'EAPK_F9D8C6E3_4DAD_4aa2_AD47_D0ABA4E93E08', 'package_name' => 'Rooms', 'phase' => '1.0', 'status' => 'Proposed', 'style' => 'BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;', 'tagged' => '0', 'version' => '1.0'
|
36
|
+
end
|
25
37
|
|
26
|
-
class
|
27
|
-
|
28
|
-
|
29
|
-
|
38
|
+
class Kitchen < RGen::MetamodelBuilder::MMMultiple(HouseMetamodel::MeetingPlace, Room)
|
39
|
+
annotation 'complexity' => '1', 'date_created' => '2005-11-30 19:26:13', 'date_modified' => '2006-06-22 21:15:34', 'ea_ntype' => '0', 'ea_stype' => 'Class', 'gentype' => 'Java', 'isSpecification' => 'false', 'package' => 'EAPK_F9D8C6E3_4DAD_4aa2_AD47_D0ABA4E93E08', 'package_name' => 'Rooms', 'phase' => '1.0', 'status' => 'Proposed', 'style' => 'BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;', 'tagged' => '0', 'version' => '1.0'
|
40
|
+
end
|
41
|
+
|
42
|
+
class Bathroom < Room
|
43
|
+
annotation 'complexity' => '1', 'date_created' => '2006-06-27 08:32:25', 'date_modified' => '2006-06-27 08:34:23', 'ea_ntype' => '0', 'ea_stype' => 'Class', 'gentype' => 'Java', 'isSpecification' => 'false', 'package' => 'EAPK_F9D8C6E3_4DAD_4aa2_AD47_D0ABA4E93E08', 'package_name' => 'Rooms', 'phase' => '1.0', 'status' => 'Proposed', 'style' => 'BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;', 'tagged' => '0', 'version' => '1.0'
|
44
|
+
end
|
30
45
|
|
31
|
-
class HouseMetamodel::House < RGen::MetamodelBuilder::MMBase
|
32
|
-
annotation 'complexity' => '1', 'date_created' => '2005-09-16 19:52:18', 'date_modified' => '2006-02-28 08:29:19', 'ea_ntype' => '0', 'ea_stype' => 'Class', 'gentype' => 'Java', 'isSpecification' => 'false', 'package' => 'EAPK_A1B83D59_CAE1_422c_BA5F_D3624D7156AD', 'package_name' => 'HouseMetamodel', 'phase' => '1.0', 'status' => 'Proposed', 'stereotype' => 'dummy', 'style' => 'BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;', 'tagged' => '0', 'version' => '1.0'
|
33
|
-
has_attr 'size', Integer
|
34
|
-
has_attr 'module', String
|
35
|
-
has_attr 'address', String, :changeable => false do
|
36
|
-
annotation 'collection' => 'false', 'containment' => 'Not Specified', 'derived' => '0', 'duplicates' => '0', 'ea_guid' => '{A8DF581B-9AC6-4f75-AB48-8FAEDFC6E068}', 'lowerBound' => '1', 'ordered' => '0', 'position' => '0', 'styleex' => 'volatile=0;', 'type' => 'String', 'upperBound' => '1'
|
37
46
|
end
|
38
|
-
end
|
39
47
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
48
|
+
module DependingOnRooms
|
49
|
+
extend RGen::MetamodelBuilder::ModuleExtension
|
50
|
+
include RGen::MetamodelBuilder::DataTypes
|
44
51
|
|
45
|
-
class HouseMetamodel::DependingOnRooms::RoomSub < HouseMetamodel::Rooms::Room
|
46
|
-
end
|
47
52
|
|
48
|
-
class
|
49
|
-
|
50
|
-
end
|
53
|
+
class RoomSub < HouseMetamodel::Rooms::Room
|
54
|
+
end
|
51
55
|
|
52
|
-
|
53
|
-
annotation 'complexity' => '1', 'date_created' => '2006-06-27 08:32:25', 'date_modified' => '2006-06-27 08:34:23', 'ea_ntype' => '0', 'ea_stype' => 'Class', 'gentype' => 'Java', 'isSpecification' => 'false', 'package' => 'EAPK_F9D8C6E3_4DAD_4aa2_AD47_D0ABA4E93E08', 'package_name' => 'Rooms', 'phase' => '1.0', 'status' => 'Proposed', 'style' => 'BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=0;HSwimLanes=0;BorderStyle=0;', 'tagged' => '0', 'version' => '1.0'
|
56
|
+
end
|
54
57
|
end
|
55
58
|
|
56
|
-
|
57
59
|
HouseMetamodel::Person.has_many 'home', HouseMetamodel::House do
|
58
60
|
annotation 'containment' => 'Unspecified'
|
59
61
|
end
|
@@ -1,10 +1,20 @@
|
|
1
1
|
<ecore:EPackage xmi:version="2.0" name="HouseMetamodel" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
|
2
|
-
<eClassifiers name="
|
3
|
-
<
|
2
|
+
<eClassifiers name="SexEnum" instanceClassName="HouseMetamodel::SexEnum" ePackage="#/" xsi:type="ecore:EEnum">
|
3
|
+
<eLiterals name="male" xsi:type="ecore:EEnumLiteral" eEnum="#//SexEnum"/>
|
4
|
+
<eLiterals name="female" xsi:type="ecore:EEnumLiteral" eEnum="#//SexEnum"/>
|
5
|
+
</eClassifiers>
|
6
|
+
<eClassifiers name="Person" abstract="false" instanceClassName="HouseMetamodel::Person" interface="false" ePackage="#/" xsi:type="ecore:EClass">
|
7
|
+
<eStructuralFeatures name="sex" derived="false" transient="false" changeable="true" eContainingClass="#//Person" unsettable="false" iD="false" xsi:type="ecore:EAttribute" upperBound="1" ordered="true" volatile="false" lowerBound="0" eType="#//SexEnum" unique="true"/>
|
8
|
+
<eStructuralFeatures name="home" derived="false" containment="false" transient="false" changeable="true" resolveProxies="true" eContainingClass="#//Person" unsettable="false" xsi:type="ecore:EReference" upperBound="-1" ordered="true" volatile="false" lowerBound="0" eType="#//House" unique="true">
|
9
|
+
<eAnnotations eModelElement="#//Person/home" xsi:type="ecore:EAnnotation">
|
10
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="Unspecified" key="containment"/>
|
11
|
+
</eAnnotations>
|
12
|
+
</eStructuralFeatures>
|
13
|
+
<eAnnotations eModelElement="#//Person" xsi:type="ecore:EAnnotation">
|
4
14
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Proposed" key="status"/>
|
5
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-
|
15
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-06-27 08:34:23" key="date_created"/>
|
6
16
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Class" key="ea_stype"/>
|
7
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-
|
17
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-06-27 08:34:26" key="date_modified"/>
|
8
18
|
<details xsi:type="ecore:EStringToStringMapEntry" value="0" key="tagged"/>
|
9
19
|
<details xsi:type="ecore:EStringToStringMapEntry" value="0" key="ea_ntype"/>
|
10
20
|
<details xsi:type="ecore:EStringToStringMapEntry" value="1.0" key="version"/>
|
@@ -17,18 +27,12 @@
|
|
17
27
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Java" key="gentype"/>
|
18
28
|
</eAnnotations>
|
19
29
|
</eClassifiers>
|
20
|
-
<eClassifiers name="
|
21
|
-
<
|
22
|
-
<eStructuralFeatures name="home" derived="false" containment="false" transient="false" changeable="true" resolveProxies="true" eContainingClass="#//Person" unsettable="false" xsi:type="ecore:EReference" upperBound="-1" ordered="true" volatile="false" lowerBound="0" eType="#//House" unique="true">
|
23
|
-
<eAnnotations eModelElement="#//Person/home" xsi:type="ecore:EAnnotation">
|
24
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="Unspecified" key="containment"/>
|
25
|
-
</eAnnotations>
|
26
|
-
</eStructuralFeatures>
|
27
|
-
<eAnnotations eModelElement="#//Person" xsi:type="ecore:EAnnotation">
|
30
|
+
<eClassifiers name="MeetingPlace" abstract="false" instanceClassName="HouseMetamodel::MeetingPlace" interface="false" ePackage="#/" xsi:type="ecore:EClass" eSubTypes="#//Rooms/Kitchen">
|
31
|
+
<eAnnotations eModelElement="#//MeetingPlace" xsi:type="ecore:EAnnotation" source="testmodel">
|
28
32
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Proposed" key="status"/>
|
29
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-
|
33
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-07-12 08:40:46" key="date_created"/>
|
30
34
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Class" key="ea_stype"/>
|
31
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-
|
35
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-07-12 08:44:02" key="date_modified"/>
|
32
36
|
<details xsi:type="ecore:EStringToStringMapEntry" value="0" key="tagged"/>
|
33
37
|
<details xsi:type="ecore:EStringToStringMapEntry" value="0" key="ea_ntype"/>
|
34
38
|
<details xsi:type="ecore:EStringToStringMapEntry" value="1.0" key="version"/>
|
@@ -84,25 +88,18 @@
|
|
84
88
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Java" key="gentype"/>
|
85
89
|
</eAnnotations>
|
86
90
|
</eClassifiers>
|
87
|
-
<eClassifiers name="SexEnum" instanceClassName="HouseMetamodel::SexEnum" ePackage="#/" xsi:type="ecore:EEnum">
|
88
|
-
<eLiterals name="male" xsi:type="ecore:EEnumLiteral" eEnum="#//SexEnum"/>
|
89
|
-
<eLiterals name="female" xsi:type="ecore:EEnumLiteral" eEnum="#//SexEnum"/>
|
90
|
-
</eClassifiers>
|
91
|
-
<eSubpackages name="DependingOnRooms" xsi:type="ecore:EPackage" eSuperPackage="#/">
|
92
|
-
<eClassifiers name="RoomSub" abstract="false" instanceClassName="HouseMetamodel::DependingOnRooms::RoomSub" interface="false" ePackage="#//DependingOnRooms" xsi:type="ecore:EClass" eSuperTypes="#//Rooms/Room"/>
|
93
|
-
</eSubpackages>
|
94
91
|
<eSubpackages name="Rooms" xsi:type="ecore:EPackage" eSuperPackage="#/">
|
95
|
-
<eClassifiers name="
|
96
|
-
<eStructuralFeatures name="house" derived="false" containment="false" transient="false" changeable="true" resolveProxies="true" eContainingClass="#//Rooms/
|
97
|
-
<eAnnotations eModelElement="#//Rooms/
|
92
|
+
<eClassifiers name="Room" abstract="true" instanceClassName="HouseMetamodel::Rooms::Room" interface="false" ePackage="#//Rooms" xsi:type="ecore:EClass" eSubTypes="#//Rooms/Kitchen #//Rooms/Bathroom #//DependingOnRooms/RoomSub">
|
93
|
+
<eStructuralFeatures name="house" derived="false" containment="false" transient="false" changeable="true" resolveProxies="true" eContainingClass="#//Rooms/Room" eOpposite="#//House/room" unsettable="false" xsi:type="ecore:EReference" upperBound="1" ordered="true" volatile="false" lowerBound="0" eType="#//House" unique="true">
|
94
|
+
<eAnnotations eModelElement="#//Rooms/Room/house" xsi:type="ecore:EAnnotation">
|
98
95
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Unspecified" key="containment"/>
|
99
96
|
</eAnnotations>
|
100
97
|
</eStructuralFeatures>
|
101
|
-
<eAnnotations eModelElement="#//Rooms/
|
98
|
+
<eAnnotations eModelElement="#//Rooms/Room" xsi:type="ecore:EAnnotation">
|
102
99
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Proposed" key="status"/>
|
103
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="2005-
|
100
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="2005-09-16 19:52:28" key="date_created"/>
|
104
101
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Class" key="ea_stype"/>
|
105
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-06-22 21:15:
|
102
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-06-22 21:15:25" key="date_modified"/>
|
106
103
|
<details xsi:type="ecore:EStringToStringMapEntry" value="0" key="tagged"/>
|
107
104
|
<details xsi:type="ecore:EStringToStringMapEntry" value="0" key="ea_ntype"/>
|
108
105
|
<details xsi:type="ecore:EStringToStringMapEntry" value="1.0" key="version"/>
|
@@ -115,17 +112,17 @@
|
|
115
112
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Java" key="gentype"/>
|
116
113
|
</eAnnotations>
|
117
114
|
</eClassifiers>
|
118
|
-
<eClassifiers name="
|
119
|
-
<eStructuralFeatures name="house" derived="false" containment="false" transient="false" changeable="true" resolveProxies="true" eContainingClass="#//Rooms/
|
120
|
-
<eAnnotations eModelElement="#//Rooms/
|
115
|
+
<eClassifiers name="Kitchen" abstract="false" instanceClassName="HouseMetamodel::Rooms::Kitchen" interface="false" ePackage="#//Rooms" xsi:type="ecore:EClass" eSuperTypes="#//MeetingPlace #//Rooms/Room">
|
116
|
+
<eStructuralFeatures name="house" derived="false" containment="false" transient="false" changeable="true" resolveProxies="true" eContainingClass="#//Rooms/Kitchen" eOpposite="#//House/kitchen" unsettable="false" xsi:type="ecore:EReference" upperBound="1" ordered="true" volatile="false" lowerBound="1" eType="#//House" unique="true">
|
117
|
+
<eAnnotations eModelElement="#//Rooms/Kitchen/house" xsi:type="ecore:EAnnotation">
|
121
118
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Unspecified" key="containment"/>
|
122
119
|
</eAnnotations>
|
123
120
|
</eStructuralFeatures>
|
124
|
-
<eAnnotations eModelElement="#//Rooms/
|
121
|
+
<eAnnotations eModelElement="#//Rooms/Kitchen" xsi:type="ecore:EAnnotation">
|
125
122
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Proposed" key="status"/>
|
126
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="2005-
|
123
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="2005-11-30 19:26:13" key="date_created"/>
|
127
124
|
<details xsi:type="ecore:EStringToStringMapEntry" value="Class" key="ea_stype"/>
|
128
|
-
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-06-22 21:15:
|
125
|
+
<details xsi:type="ecore:EStringToStringMapEntry" value="2006-06-22 21:15:34" key="date_modified"/>
|
129
126
|
<details xsi:type="ecore:EStringToStringMapEntry" value="0" key="tagged"/>
|
130
127
|
<details xsi:type="ecore:EStringToStringMapEntry" value="0" key="ea_ntype"/>
|
131
128
|
<details xsi:type="ecore:EStringToStringMapEntry" value="1.0" key="version"/>
|
@@ -157,4 +154,7 @@
|
|
157
154
|
</eAnnotations>
|
158
155
|
</eClassifiers>
|
159
156
|
</eSubpackages>
|
157
|
+
<eSubpackages name="DependingOnRooms" xsi:type="ecore:EPackage" eSuperPackage="#/">
|
158
|
+
<eClassifiers name="RoomSub" abstract="false" instanceClassName="HouseMetamodel::DependingOnRooms::RoomSub" interface="false" ePackage="#//DependingOnRooms" xsi:type="ecore:EClass" eSuperTypes="#//Rooms/Room"/>
|
159
|
+
</eSubpackages>
|
160
160
|
</ecore:EPackage>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Thiede
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-18 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|