rgen 0.4.6 → 0.5.0

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.
Files changed (60) hide show
  1. data/CHANGELOG +95 -83
  2. data/Rakefile +4 -3
  3. data/lib/ea_support/ea_support.rb +54 -0
  4. data/lib/ea_support/id_store.rb +32 -0
  5. data/lib/ea_support/uml13_ea_metamodel.rb +562 -0
  6. data/lib/ea_support/uml13_ea_metamodel_ext.rb +45 -0
  7. data/lib/ea_support/uml13_ea_metamodel_generator.rb +43 -0
  8. data/lib/ea_support/uml13_ea_to_uml13.rb +72 -0
  9. data/lib/ea_support/uml13_to_uml13_ea.rb +82 -0
  10. data/lib/rgen/ecore/ecore.rb +16 -2
  11. data/lib/rgen/ecore/ecore_builder_methods.rb +81 -0
  12. data/lib/rgen/ecore/ecore_instantiator.rb +5 -1
  13. data/lib/rgen/metamodel_builder/builder_extensions.rb +11 -3
  14. data/lib/rgen/metamodel_builder/module_extension2.rb +205 -0
  15. data/lib/rgen/method_delegation.rb +99 -0
  16. data/lib/rgen/model_builder.rb +27 -0
  17. data/lib/rgen/model_builder/builder_context.rb +318 -0
  18. data/lib/rgen/model_builder/model_serializer.rb +201 -0
  19. data/lib/rgen/model_builder/reference_resolver.rb +156 -0
  20. data/lib/rgen/template_language/directory_template_container.rb +6 -2
  21. data/lib/rgen/template_language/output_handler.rb +2 -4
  22. data/lib/rgen/template_language/template_container.rb +212 -195
  23. data/lib/rgen/transformer.rb +95 -4
  24. data/lib/transformers/ecore_to_uml13.rb +66 -0
  25. data/lib/transformers/uml13_to_ecore.rb +16 -7
  26. data/test/ea_instantiator_test.rb +8 -14
  27. data/test/ea_serializer_test.rb +3 -9
  28. data/test/ea_serializer_test/ea_testmodel_regenerated.xml +2 -2
  29. data/test/ea_serializer_test/ea_testmodel_regenerated_import.log +3 -0
  30. data/test/metamodel_roundtrip_test/TestModel_Regenerated.rb +19 -19
  31. data/test/metamodel_roundtrip_test/houseMetamodel_Regenerated.ecore +44 -44
  32. data/test/method_delegation_test.rb +178 -0
  33. data/test/model_builder/builder_context_test.rb +59 -0
  34. data/test/model_builder/builder_test.rb +284 -0
  35. data/test/model_builder/ecore_internal.rb +103 -0
  36. data/test/model_builder/ecore_original.rb +163 -0
  37. data/test/model_builder/ecore_original_regenerated.rb +163 -0
  38. data/test/model_builder/reference_resolver_test.rb +156 -0
  39. data/test/model_builder/serializer_test.rb +63 -0
  40. data/test/model_builder_test.rb +4 -0
  41. data/test/rgen_test.rb +2 -0
  42. data/test/template_language_test.rb +41 -1
  43. data/test/template_language_test/expected_result1.txt +1 -3
  44. data/test/template_language_test/templates/define_local_test/local.tpl +8 -0
  45. data/test/template_language_test/templates/define_local_test/test.tpl +8 -0
  46. data/test/template_language_test/templates/evaluate_test/test.tpl +7 -0
  47. data/test/template_language_test/templates/no_indent_test/no_indent.tpl +3 -0
  48. data/test/template_language_test/templates/no_indent_test/sub1/no_indent.tpl +3 -0
  49. data/test/template_language_test/templates/no_indent_test/test.tpl +24 -0
  50. data/test/template_language_test/templates/no_indent_test/test2.tpl +13 -0
  51. data/test/template_language_test/templates/no_indent_test/test3.tpl +10 -0
  52. data/test/template_language_test/templates/template_resolution_test/sub1.tpl +9 -0
  53. data/test/template_language_test/templates/template_resolution_test/sub1/sub1.tpl +3 -0
  54. data/test/template_language_test/templates/template_resolution_test/test.tpl +4 -0
  55. data/test/template_language_test/testout.txt +1 -3
  56. data/test/testmodel/ea_testmodel_import.log +1 -0
  57. data/test/testmodel/ea_testmodel_regenerated.xml +808 -0
  58. data/test/transformer_test.rb +3 -5
  59. metadata +52 -3
  60. data/lib/instantiators/ea_instantiator.rb +0 -39
data/CHANGELOG CHANGED
@@ -1,83 +1,95 @@
1
- =0.1.0 (August 3rd, 2006)
2
-
3
- * First public release
4
-
5
- =0.2.0 (September 3rd, 2006)
6
-
7
- * Added model transformation language (Transformer)
8
- * Now RGen is distributed as a gem
9
- * More complete documentation
10
-
11
- =0.3.0 (October 9th, 2006)
12
-
13
- * Improved XML Instantiator (Namespaces, Resolver, Customization)
14
- * Added many_to_one builder method
15
- * Added attribute reflection to MMBase (one_attributes, many_attributes)
16
- * Added +copy+ method to Transformer
17
- * Added simple model dumper module
18
- * Fixed mmgen/mmgen.rb
19
-
20
- =0.4.0 (Aug 8th, 2007)
21
-
22
- * Added ECore metamodel and use it as the core metametamodel
23
- * Revised and extended MetamodelBuilder language
24
- * There is an ECore instance describing each metamodel built using MetamodelBuilder now
25
- * Metamodel generator is now ECore based
26
- * Added Ruby implementation of Boolean and Enum types
27
- * Switched XML Instantiator to xmlscan for performance reasons
28
- * Cleaned up instantiator file structure
29
- * Renamed RGen::XMLInstantiator into RGen::Instantiator::DefaultXMLInstantiator
30
- * Included xmlscan as a redistributed module
31
- * Added support for chardata within XML tags
32
- * Added (Enterprise Architect) XMI to ECore instantiator
33
- * Some minor fixes in NameHelper
34
- * Some fixes to template language
35
- * Added UML1.3 Metamodel
36
- * Added tranformation from UML1.3 to ECore
37
-
38
- =0.4.1 (Nov 25th, 2007)
39
-
40
- * Template language performance improvement
41
- * Bugfix: use true/false instead of symbols for boolean attribute default values in metamodel classes
42
- * Minor fixes on metamodel generator and ecore primitive type handling
43
- * Made transformer implementation non-recursive to prevent "stack level too deep" exception for large models
44
- * Minor fixes on EAInstantiator
45
- * Made transformer search for matching rules for superclasses
46
- * Bugfix: Enums are now added to EPackages created using the "ecore" method on a module
47
- * Bugfix: Metamodel generator now writes enum names
48
- * Performance improvement: don't require ecore transformer every time someone calls "ecore"
49
- * Major performance improvement of template engine (no Regexps to check \n at end of line)
50
- * Major performance improvement: AbstractXMLInstantiator optionally controls the garbage collector
51
- * Major performance improvement: ERB templates are reused in metamodel_builder
52
- * Added delete method to Environment
53
-
54
- =0.4.2 (Mar 2nd, 2008)
55
-
56
- * Performance improvement: collection feature of array extension uses hashes now to speed up array union
57
- * Performance improvement: find on environment hashes elements by class
58
- * Extended Transformer to allow sharing of result maps between several Transformer instances
59
- * Bugfix: User defined upper bound values are no longer overwritten by -1 in all "many" metamodel builder methods
60
-
61
- =0.4.3 (Aug 12th, 2008)
62
-
63
- * Performance improvement: significant speed up of metamodel reverse registration
64
- * Bugfix: Use object identity for metamodel to-many add/remove methods
65
- * Bugfix: If expand's :for expression evaluates to nil an error is generated (silently used current context before)
66
- * Template language indentation string can be set on DirectoryTemplateContainer and with the "file" command
67
-
68
- =0.4.4 (Sep 10th, 2008)
69
-
70
- * Added "abstract" metamodel DSL command
71
- * Added ecore_ext.rb with convenience methods
72
- * Added XMI1.1 serializer, revised XMLSerializer super class
73
-
74
- =0.4.5 (Nov 17th, 2008)
75
-
76
- * Updated XMI1.1 serializer to support explicit placement of elements on content level of the XMI file
77
-
78
- =0.4.6 (Mar 1st, 2009)
79
-
80
- * Bugfix: expand :foreach silently assumed current context if :foreach evalutated to nil
81
- * Bugfix: fixed unit test for non-Windows plattforms (\r\n)
82
- * Bugfix: depending on the Ruby version and/or platform constants used in templates could not be resolved
83
- * Added automatic line ending detection (\n or \r\n) for template language +nl+ command
1
+ =0.1.0 (August 3rd, 2006)
2
+
3
+ * First public release
4
+
5
+ =0.2.0 (September 3rd, 2006)
6
+
7
+ * Added model transformation language (Transformer)
8
+ * Now RGen is distributed as a gem
9
+ * More complete documentation
10
+
11
+ =0.3.0 (October 9th, 2006)
12
+
13
+ * Improved XML Instantiator (Namespaces, Resolver, Customization)
14
+ * Added many_to_one builder method
15
+ * Added attribute reflection to MMBase (one_attributes, many_attributes)
16
+ * Added +copy+ method to Transformer
17
+ * Added simple model dumper module
18
+ * Fixed mmgen/mmgen.rb
19
+
20
+ =0.4.0 (Aug 8th, 2007)
21
+
22
+ * Added ECore metamodel and use it as the core metametamodel
23
+ * Revised and extended MetamodelBuilder language
24
+ * There is an ECore instance describing each metamodel built using MetamodelBuilder now
25
+ * Metamodel generator is now ECore based
26
+ * Added Ruby implementation of Boolean and Enum types
27
+ * Switched XML Instantiator to xmlscan for performance reasons
28
+ * Cleaned up instantiator file structure
29
+ * Renamed RGen::XMLInstantiator into RGen::Instantiator::DefaultXMLInstantiator
30
+ * Included xmlscan as a redistributed module
31
+ * Added support for chardata within XML tags
32
+ * Added (Enterprise Architect) XMI to ECore instantiator
33
+ * Some minor fixes in NameHelper
34
+ * Some fixes to template language
35
+ * Added UML1.3 Metamodel
36
+ * Added tranformation from UML1.3 to ECore
37
+
38
+ =0.4.1 (Nov 25th, 2007)
39
+
40
+ * Template language performance improvement
41
+ * Bugfix: use true/false instead of symbols for boolean attribute default values in metamodel classes
42
+ * Minor fixes on metamodel generator and ecore primitive type handling
43
+ * Made transformer implementation non-recursive to prevent "stack level too deep" exception for large models
44
+ * Minor fixes on EAInstantiator
45
+ * Made transformer search for matching rules for superclasses
46
+ * Bugfix: Enums are now added to EPackages created using the "ecore" method on a module
47
+ * Bugfix: Metamodel generator now writes enum names
48
+ * Performance improvement: don't require ecore transformer every time someone calls "ecore"
49
+ * Major performance improvement of template engine (no Regexps to check \n at end of line)
50
+ * Major performance improvement: AbstractXMLInstantiator optionally controls the garbage collector
51
+ * Major performance improvement: ERB templates are reused in metamodel_builder
52
+ * Added delete method to Environment
53
+
54
+ =0.4.2 (Mar 2nd, 2008)
55
+
56
+ * Performance improvement: collection feature of array extension uses hashes now to speed up array union
57
+ * Performance improvement: find on environment hashes elements by class
58
+ * Extended Transformer to allow sharing of result maps between several Transformer instances
59
+ * Bugfix: User defined upper bound values are no longer overwritten by -1 in all "many" metamodel builder methods
60
+
61
+ =0.4.3 (Aug 12th, 2008)
62
+
63
+ * Performance improvement: significant speed up of metamodel reverse registration
64
+ * Bugfix: Use object identity for metamodel to-many add/remove methods
65
+ * Bugfix: If expand's :for expression evaluates to nil an error is generated (silently used current context before)
66
+ * Template language indentation string can be set on DirectoryTemplateContainer and with the "file" command
67
+
68
+ =0.4.4 (Sep 10th, 2008)
69
+
70
+ * Added "abstract" metamodel DSL command
71
+ * Added ecore_ext.rb with convenience methods
72
+ * Added XMI1.1 serializer, revised XMLSerializer super class
73
+
74
+ =0.4.5 (Nov 17th, 2008)
75
+
76
+ * Updated XMI1.1 serializer to support explicit placement of elements on content level of the XMI file
77
+
78
+ =0.4.6 (Mar 1st, 2009)
79
+
80
+ * Bugfix: expand :foreach silently assumed current context if :foreach evalutated to nil
81
+ * Bugfix: fixed unit test for non-Windows plattforms (\r\n)
82
+ * Bugfix: depending on the Ruby version and/or platform constants used in templates could not be resolved
83
+ * Added automatic line ending detection (\n or \r\n) for template language +nl+ command
84
+
85
+ =0.5.0 (Jun 8th, 2009)
86
+
87
+ * Added ModelBuilder and ModelSerializer
88
+ * Added template language "define_local" command
89
+ * Added template language "evaluate" command
90
+ * Fixed template language bug: indentation problem when expand continues a non-empty line
91
+ * Fixed template language bug: template content expands several times when a template container is called recursively
92
+ * Fixed template language bug: template resolution problem if a template file has the same name as a template directory
93
+ * Cleaned up EA support
94
+ * Added method to clear ecore metamodel reflection cache
95
+ * Improved overriding of metamodel features in reopened classes
data/Rakefile CHANGED
@@ -3,8 +3,8 @@ require 'rake/rdoctask'
3
3
 
4
4
  RGenGemSpec = Gem::Specification.new do |s|
5
5
  s.name = %q{rgen}
6
- s.version = "0.4.6"
7
- s.date = %q{2009-03-01}
6
+ s.version = "0.5.0"
7
+ s.date = %q{2009-06-08}
8
8
  s.summary = %q{Ruby Modelling and Generator Framework}
9
9
  s.email = %q{martin dot thiede at gmx de}
10
10
  s.homepage = %q{ruby-gen.org}
@@ -17,7 +17,7 @@ RGenGemSpec = Gem::Specification.new do |s|
17
17
  gemfiles.include("README", "CHANGELOG", "MIT-LICENSE", "Rakefile")
18
18
  gemfiles.exclude(/\b\.bak\b/)
19
19
  s.files = gemfiles
20
- s.rdoc_options = ["--main", "README", "-x", "redist", "-x", "test", "-x", "metamodels"]
20
+ s.rdoc_options = ["--main", "README", "-x", "redist", "-x", "test", "-x", "metamodels", "-x", "ea_support/uml13*"]
21
21
  s.extra_rdoc_files = ["README", "CHANGELOG", "MIT-LICENSE"]
22
22
  end
23
23
 
@@ -25,6 +25,7 @@ Rake::RDocTask.new do |rd|
25
25
  rd.main = "README"
26
26
  rd.rdoc_files.include("README", "CHANGELOG", "MIT-LICENSE", "lib/**/*.rb")
27
27
  rd.rdoc_files.exclude("lib/metamodels")
28
+ rd.rdoc_files.exclude("lib/ea_support/uml13*")
28
29
  rd.rdoc_dir = "doc"
29
30
  end
30
31
 
@@ -0,0 +1,54 @@
1
+ require 'ea_support/uml13_ea_metamodel'
2
+ require 'ea_support/uml13_ea_metamodel_ext'
3
+ require 'ea_support/uml13_to_uml13_ea'
4
+ require 'ea_support/uml13_ea_to_uml13'
5
+ require 'ea_support/id_store'
6
+ require 'rgen/serializer/xmi11_serializer'
7
+ require 'rgen/instantiator/xmi11_instantiator'
8
+ require 'rgen/environment'
9
+
10
+ module EASupport
11
+
12
+ FIXMAP = {
13
+ :tags => {
14
+ "EAStub" => proc { |tag, attr|
15
+ UML13EA::Class.new(:name => attr["name"]) if attr["UMLType"] == "Class"
16
+ }
17
+ }
18
+ }
19
+
20
+ INFO = XMI11Instantiator::INFO
21
+ WARN = XMI11Instantiator::WARN
22
+ ERROR = XMI11Instantiator::ERROR
23
+
24
+ def self.instantiateUML13FromXMI11(envUML, fileName, options={})
25
+ envUMLEA = RGen::Environment.new
26
+ xmiInst = XMI11Instantiator.new(envUMLEA, FIXMAP, options[:loglevel] || ERROR)
27
+ xmiInst.add_metamodel("omg.org/UML1.3", UML13EA)
28
+ File.open(fileName) do |f|
29
+ xmiInst.instantiate(f.read)
30
+ end
31
+ trans = UML13EAToUML13.new(envUMLEA, envUML)
32
+ trans.transform
33
+ trans.cleanModel if options[:clean_model]
34
+ end
35
+
36
+ def self.serializeUML13ToXMI11(envUML, fileName, options={})
37
+ envUMLEA = RGen::Environment.new
38
+
39
+ UML13EA.idStore = options[:keep_ids] ?
40
+ IdStore.new(File.dirname(fileName)+"/"+File.basename(fileName)+".ids") : IdStore.new
41
+
42
+ UML13ToUML13EA.new(envUML, envUMLEA).transform
43
+
44
+ File.open(fileName, "w") do |f|
45
+ xmiSer = RGen::Serializer::XMI11Serializer.new(f)
46
+ xmiSer.setNamespace("UML","omg.org/UML1.3")
47
+ xmiSer.serialize(envUMLEA.find(:class => UML13EA::Model).first,
48
+ {:documentation => {:exporter => "Enterprise Architect", :exporterVersion => "2.5"}})
49
+ end
50
+
51
+ UML13EA.idStore.store
52
+ end
53
+
54
+ end
@@ -0,0 +1,32 @@
1
+ require 'yaml'
2
+
3
+ class IdStore
4
+ def initialize(fileName=nil)
5
+ if fileName
6
+ raise "Base directory does not exist: #{File.dirname(fileName)}" \
7
+ unless File.exist?(File.dirname(fileName))
8
+ @idsFileName = fileName
9
+ end
10
+ @idHash = nil
11
+ end
12
+
13
+ def idHash
14
+ load unless @idHash
15
+ @idHash
16
+ end
17
+
18
+ def load
19
+ if @idsFileName && File.exist?(@idsFileName)
20
+ @idHash = YAML.load_file(@idsFileName) || {}
21
+ else
22
+ @idHash = {}
23
+ end
24
+ end
25
+
26
+ def store
27
+ return unless @idsFileName
28
+ File.open(@idsFileName,"w") do |f|
29
+ YAML.dump(@idHash, f)
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,562 @@
1
+ require 'rgen/metamodel_builder'
2
+
3
+ module UML13EA
4
+ extend RGen::MetamodelBuilder::ModuleExtension
5
+ include RGen::MetamodelBuilder::DataTypes
6
+
7
+ OperationDirectionKind = Enum.new(:name => 'OperationDirectionKind', :literals =>[ ])
8
+ MessageDirectionKind = Enum.new(:name => 'MessageDirectionKind', :literals =>[ ])
9
+ ChangeableKind = Enum.new(:name => 'ChangeableKind', :literals =>[ :changeable, :none, :addOnly ])
10
+ PseudostateKind = Enum.new(:name => 'PseudostateKind', :literals =>[ :initial, :deepHistory, :shallowHistory, :join, :fork, :branch, :junction, :final ])
11
+ ParameterDirectionKind = Enum.new(:name => 'ParameterDirectionKind', :literals =>[ :in, :inout, :out, :return ])
12
+ ScopeKind = Enum.new(:name => 'ScopeKind', :literals =>[ :instance, :classifier ])
13
+ OrderingKind = Enum.new(:name => 'OrderingKind', :literals =>[ :unordered, :ordered, :sorted ])
14
+ CallConcurrencyKind = Enum.new(:name => 'CallConcurrencyKind', :literals =>[ :sequential, :guarded, :concurrent ])
15
+ AggregationKind = Enum.new(:name => 'AggregationKind', :literals =>[ :none, :aggregate, :composite ])
16
+ VisibilityKind = Enum.new(:name => 'VisibilityKind', :literals =>[ :public, :protected, :private ])
17
+ end
18
+
19
+ class UML13EA::Expression < RGen::MetamodelBuilder::MMBase
20
+ has_attr 'language', String
21
+ has_attr 'body', String
22
+ end
23
+
24
+ class UML13EA::ActionExpression < UML13EA::Expression
25
+ end
26
+
27
+ class UML13EA::Element < RGen::MetamodelBuilder::MMBase
28
+ end
29
+
30
+ class UML13EA::ModelElement < UML13EA::Element
31
+ has_attr 'name', String
32
+ has_attr 'visibility', UML13EA::VisibilityKind, :defaultValueLiteral => "public"
33
+ has_attr 'isSpecification', Boolean
34
+ end
35
+
36
+ class UML13EA::Namespace < UML13EA::ModelElement
37
+ end
38
+
39
+ class UML13EA::GeneralizableElement < UML13EA::ModelElement
40
+ has_attr 'isRoot', Boolean
41
+ has_attr 'isLeaf', Boolean
42
+ has_attr 'isAbstract', Boolean
43
+ end
44
+
45
+ class UML13EA::Classifier < RGen::MetamodelBuilder::MMMultiple(UML13EA::GeneralizableElement, UML13EA::Namespace)
46
+ end
47
+
48
+ class UML13EA::ClassifierRole < UML13EA::Classifier
49
+ end
50
+
51
+ class UML13EA::PresentationElement < UML13EA::Element
52
+ end
53
+
54
+ class UML13EA::DiagramElement < UML13EA::PresentationElement
55
+ has_attr 'geometry', String
56
+ has_attr 'style', String
57
+ end
58
+
59
+ class UML13EA::Feature < UML13EA::ModelElement
60
+ has_attr 'ownerScope', UML13EA::ScopeKind, :defaultValueLiteral => "instance"
61
+ end
62
+
63
+ class UML13EA::BehavioralFeature < UML13EA::Feature
64
+ has_attr 'isQuery', Boolean
65
+ end
66
+
67
+ class UML13EA::Method < UML13EA::BehavioralFeature
68
+ end
69
+
70
+ class UML13EA::Actor < UML13EA::Classifier
71
+ end
72
+
73
+ class UML13EA::DataType < UML13EA::Classifier
74
+ end
75
+
76
+ class UML13EA::Primitive < UML13EA::DataType
77
+ end
78
+
79
+ class UML13EA::Action < UML13EA::ModelElement
80
+ has_attr 'isAsynchronous', Boolean
81
+ end
82
+
83
+ class UML13EA::SendAction < UML13EA::Action
84
+ end
85
+
86
+ class UML13EA::Interface < UML13EA::Classifier
87
+ end
88
+
89
+ class UML13EA::Event < UML13EA::ModelElement
90
+ end
91
+
92
+ class UML13EA::ChangeEvent < UML13EA::Event
93
+ end
94
+
95
+ class UML13EA::Partition < UML13EA::ModelElement
96
+ end
97
+
98
+ class UML13EA::Comment < UML13EA::ModelElement
99
+ has_attr 'body', String
100
+ end
101
+
102
+ class UML13EA::ProgrammingLanguageType < UML13EA::DataType
103
+ end
104
+
105
+ class UML13EA::StateMachine < UML13EA::ModelElement
106
+ end
107
+
108
+ class UML13EA::Call < RGen::MetamodelBuilder::MMBase
109
+ end
110
+
111
+ class UML13EA::Operation < UML13EA::BehavioralFeature
112
+ has_attr 'concurrency', UML13EA::CallConcurrencyKind, :defaultValueLiteral => "sequential"
113
+ has_attr 'isRoot', Boolean
114
+ has_attr 'isLeaf', Boolean
115
+ has_attr 'isAbstract', Boolean
116
+ end
117
+
118
+ class UML13EA::XmiIdProvider < RGen::MetamodelBuilder::MMBase
119
+ end
120
+
121
+ class UML13EA::StateVertex < RGen::MetamodelBuilder::MMMultiple(UML13EA::ModelElement, UML13EA::XmiIdProvider)
122
+ end
123
+
124
+ class UML13EA::SynchState < UML13EA::StateVertex
125
+ has_attr 'bound', Integer
126
+ end
127
+
128
+ class UML13EA::ClassifierInState < UML13EA::Classifier
129
+ end
130
+
131
+ class UML13EA::Link < UML13EA::ModelElement
132
+ end
133
+
134
+ class UML13EA::ProcedureExpression < UML13EA::Expression
135
+ end
136
+
137
+ class UML13EA::CallEvent < UML13EA::Event
138
+ end
139
+
140
+ class UML13EA::AssignmentAction < UML13EA::Action
141
+ end
142
+
143
+ class UML13EA::Relationship < UML13EA::ModelElement
144
+ end
145
+
146
+ class UML13EA::Association < RGen::MetamodelBuilder::MMMultiple(UML13EA::GeneralizableElement, UML13EA::Relationship, UML13EA::XmiIdProvider)
147
+ end
148
+
149
+ class UML13EA::AssociationRole < UML13EA::Association
150
+ end
151
+
152
+ class UML13EA::Diagram < UML13EA::PresentationElement
153
+ has_attr 'name', String
154
+ has_attr 'toolName', String
155
+ has_attr 'diagramType', String
156
+ has_attr 'style', String
157
+ end
158
+
159
+ class UML13EA::MultiplicityRange < RGen::MetamodelBuilder::MMBase
160
+ has_attr 'lower', String
161
+ has_attr 'upper', String
162
+ end
163
+
164
+ class UML13EA::ActionSequence < UML13EA::Action
165
+ end
166
+
167
+ class UML13EA::Constraint < UML13EA::ModelElement
168
+ end
169
+
170
+ class UML13EA::Instance < UML13EA::ModelElement
171
+ end
172
+
173
+ class UML13EA::UseCaseInstance < UML13EA::Instance
174
+ end
175
+
176
+ class UML13EA::State < UML13EA::StateVertex
177
+ end
178
+
179
+ class UML13EA::CompositeState < UML13EA::State
180
+ has_attr 'isConcurrent', Boolean
181
+ end
182
+
183
+ class UML13EA::SubmachineState < UML13EA::CompositeState
184
+ end
185
+
186
+ class UML13EA::SubactivityState < UML13EA::SubmachineState
187
+ has_attr 'isDynamic', Boolean
188
+ end
189
+
190
+ class UML13EA::StructuralFeature < UML13EA::Feature
191
+ has_attr 'changeability', UML13EA::ChangeableKind, :defaultValueLiteral => "changeable"
192
+ has_attr 'targetScope', UML13EA::ScopeKind, :defaultValueLiteral => "instance"
193
+ end
194
+
195
+ class UML13EA::Attribute < UML13EA::StructuralFeature
196
+ end
197
+
198
+ class UML13EA::Flow < UML13EA::Relationship
199
+ end
200
+
201
+ class UML13EA::Class < RGen::MetamodelBuilder::MMMultiple(UML13EA::Classifier, UML13EA::XmiIdProvider)
202
+ has_attr 'isActive', Boolean
203
+ end
204
+
205
+ class UML13EA::Guard < UML13EA::ModelElement
206
+ end
207
+
208
+ class UML13EA::CreateAction < UML13EA::Action
209
+ end
210
+
211
+ class UML13EA::IterationExpression < UML13EA::Expression
212
+ end
213
+
214
+ class UML13EA::ReturnAction < UML13EA::Action
215
+ end
216
+
217
+ class UML13EA::Parameter < UML13EA::ModelElement
218
+ has_attr 'kind', UML13EA::ParameterDirectionKind, :defaultValueLiteral => "inout"
219
+ end
220
+
221
+ class UML13EA::Dependency < UML13EA::Relationship
222
+ end
223
+
224
+ class UML13EA::Binding < UML13EA::Dependency
225
+ end
226
+
227
+ class UML13EA::Package < RGen::MetamodelBuilder::MMMultiple(UML13EA::Namespace, UML13EA::GeneralizableElement, UML13EA::XmiIdProvider)
228
+ end
229
+
230
+ class UML13EA::ObjectSetExpression < UML13EA::Expression
231
+ end
232
+
233
+ class UML13EA::StubState < UML13EA::StateVertex
234
+ has_attr 'referenceState', String
235
+ end
236
+
237
+ class UML13EA::Stereotype < UML13EA::GeneralizableElement
238
+ has_attr 'icon', String
239
+ has_attr 'baseClass', String
240
+ end
241
+
242
+ class UML13EA::Object < UML13EA::Instance
243
+ end
244
+
245
+ class UML13EA::LinkObject < RGen::MetamodelBuilder::MMMultiple(UML13EA::Link, UML13EA::Object)
246
+ end
247
+
248
+ class UML13EA::ComponentInstance < UML13EA::Instance
249
+ end
250
+
251
+ class UML13EA::Usage < UML13EA::Dependency
252
+ end
253
+
254
+ class UML13EA::SignalEvent < UML13EA::Event
255
+ end
256
+
257
+ class UML13EA::Structure < UML13EA::DataType
258
+ end
259
+
260
+ class UML13EA::AssociationEnd < RGen::MetamodelBuilder::MMMultiple(UML13EA::ModelElement, UML13EA::XmiIdProvider)
261
+ has_attr 'isNavigable', Boolean, :defaultValueLiteral => "false"
262
+ has_attr 'isOrdered', Boolean, :defaultValueLiteral => "unordered"
263
+ has_attr 'aggregation', UML13EA::AggregationKind, :defaultValueLiteral => "none"
264
+ has_attr 'targetScope', UML13EA::ScopeKind, :defaultValueLiteral => "instance"
265
+ has_attr 'changeable', UML13EA::ChangeableKind, :defaultValueLiteral => "changeable"
266
+ has_attr 'multiplicity', String
267
+ end
268
+
269
+ class UML13EA::AssociationEndRole < UML13EA::AssociationEnd
270
+ end
271
+
272
+ class UML13EA::Signal < UML13EA::Classifier
273
+ end
274
+
275
+ class UML13EA::Exception < UML13EA::Signal
276
+ end
277
+
278
+ class UML13EA::Extend < UML13EA::Relationship
279
+ end
280
+
281
+ class UML13EA::Argument < UML13EA::ModelElement
282
+ end
283
+
284
+ class UML13EA::TemplateParameter < RGen::MetamodelBuilder::MMBase
285
+ end
286
+
287
+ class UML13EA::PseudoState < UML13EA::StateVertex
288
+ has_attr 'kind', UML13EA::PseudostateKind, :defaultValueLiteral => "initial"
289
+ end
290
+
291
+ class UML13EA::SimpleState < UML13EA::State
292
+ end
293
+
294
+ class UML13EA::ActionState < UML13EA::SimpleState
295
+ has_attr 'isDynamic', Boolean
296
+ end
297
+
298
+ class UML13EA::TypeExpression < UML13EA::Expression
299
+ end
300
+
301
+ class UML13EA::DestroyAction < UML13EA::Action
302
+ end
303
+
304
+ class UML13EA::TerminateAction < UML13EA::Action
305
+ end
306
+
307
+ class UML13EA::Generalization < RGen::MetamodelBuilder::MMMultiple(UML13EA::Relationship, UML13EA::XmiIdProvider)
308
+ has_attr 'discriminator', String
309
+ end
310
+
311
+ class UML13EA::FinalState < UML13EA::State
312
+ end
313
+
314
+ class UML13EA::Subsystem < RGen::MetamodelBuilder::MMMultiple(UML13EA::Package, UML13EA::Classifier)
315
+ has_attr 'isInstantiable', Boolean
316
+ end
317
+
318
+ class UML13EA::TimeExpression < UML13EA::Expression
319
+ end
320
+
321
+ class UML13EA::TaggedValue < UML13EA::Element
322
+ has_attr 'tag', String
323
+ has_attr 'value', String
324
+ end
325
+
326
+ class UML13EA::DataValue < UML13EA::Instance
327
+ end
328
+
329
+ class UML13EA::Transition < UML13EA::ModelElement
330
+ end
331
+
332
+ class UML13EA::NodeInstance < UML13EA::Instance
333
+ end
334
+
335
+ class UML13EA::Component < UML13EA::Classifier
336
+ end
337
+
338
+ class UML13EA::Message < UML13EA::ModelElement
339
+ end
340
+
341
+ class UML13EA::Enumeration < UML13EA::DataType
342
+ end
343
+
344
+ class UML13EA::Reception < UML13EA::BehavioralFeature
345
+ has_attr 'isPolymorphic', Boolean
346
+ has_attr 'specification', String
347
+ end
348
+
349
+ class UML13EA::Include < UML13EA::Relationship
350
+ end
351
+
352
+ class UML13EA::CallState < UML13EA::ActionState
353
+ end
354
+
355
+ class UML13EA::ElementResidence < RGen::MetamodelBuilder::MMBase
356
+ has_attr 'visibility', UML13EA::VisibilityKind, :defaultValueLiteral => "public"
357
+ end
358
+
359
+ class UML13EA::UninterpretedAction < UML13EA::Action
360
+ end
361
+
362
+ class UML13EA::ArgListsExpression < UML13EA::Expression
363
+ end
364
+
365
+ class UML13EA::Stimulus < UML13EA::ModelElement
366
+ end
367
+
368
+ class UML13EA::AssociationClass < RGen::MetamodelBuilder::MMMultiple(UML13EA::Class, UML13EA::Association)
369
+ end
370
+
371
+ class UML13EA::Node < UML13EA::Classifier
372
+ end
373
+
374
+ class UML13EA::ElementImport < RGen::MetamodelBuilder::MMBase
375
+ has_attr 'visibility', UML13EA::VisibilityKind, :defaultValueLiteral => "public"
376
+ has_attr 'alias', String
377
+ end
378
+
379
+ class UML13EA::BooleanExpression < UML13EA::Expression
380
+ end
381
+
382
+ class UML13EA::Collaboration < RGen::MetamodelBuilder::MMMultiple(UML13EA::GeneralizableElement, UML13EA::Namespace)
383
+ end
384
+
385
+ class UML13EA::CallAction < UML13EA::Action
386
+ end
387
+
388
+ class UML13EA::UseCase < UML13EA::Classifier
389
+ end
390
+
391
+ class UML13EA::ActivityModel < UML13EA::StateMachine
392
+ end
393
+
394
+ class UML13EA::Permission < UML13EA::Dependency
395
+ end
396
+
397
+ class UML13EA::Interaction < UML13EA::ModelElement
398
+ end
399
+
400
+ class UML13EA::EnumerationLiteral < RGen::MetamodelBuilder::MMBase
401
+ has_attr 'name', String
402
+ end
403
+
404
+ class UML13EA::Model < UML13EA::Package
405
+ end
406
+
407
+ class UML13EA::LinkEnd < UML13EA::ModelElement
408
+ end
409
+
410
+ class UML13EA::ExtensionPoint < UML13EA::ModelElement
411
+ has_attr 'location', String
412
+ end
413
+
414
+ class UML13EA::Multiplicity < RGen::MetamodelBuilder::MMBase
415
+ end
416
+
417
+ class UML13EA::ObjectFlowState < UML13EA::SimpleState
418
+ has_attr 'isSynch', Boolean
419
+ end
420
+
421
+ class UML13EA::AttributeLink < UML13EA::ModelElement
422
+ end
423
+
424
+ class UML13EA::MappingExpression < UML13EA::Expression
425
+ end
426
+
427
+ class UML13EA::TimeEvent < UML13EA::Event
428
+ end
429
+
430
+ class UML13EA::Abstraction < UML13EA::Dependency
431
+ end
432
+
433
+ class UML13EA::ActionInstance < RGen::MetamodelBuilder::MMBase
434
+ end
435
+
436
+
437
+ UML13EA::ClassifierRole.contains_one_uni 'multiplicity', UML13EA::Multiplicity
438
+ UML13EA::ClassifierRole.has_many 'availableContents', UML13EA::ModelElement
439
+ UML13EA::ClassifierRole.has_many 'availableFeature', UML13EA::Feature
440
+ UML13EA::ClassifierRole.has_one 'base', UML13EA::Classifier, :lowerBound => 1
441
+ UML13EA::Diagram.contains_many 'element', UML13EA::DiagramElement, 'diagram'
442
+ UML13EA::Method.many_to_one 'specification', UML13EA::Operation, 'method'
443
+ UML13EA::Method.contains_one_uni 'body', UML13EA::ProcedureExpression
444
+ UML13EA::SendAction.has_one 'signal', UML13EA::Signal, :lowerBound => 1
445
+ UML13EA::ChangeEvent.contains_one_uni 'changeExpression', UML13EA::BooleanExpression
446
+ UML13EA::Partition.has_many 'contents', UML13EA::ModelElement
447
+ UML13EA::Comment.many_to_many 'annotatedElement', UML13EA::ModelElement, 'comment'
448
+ UML13EA::ProgrammingLanguageType.contains_one_uni 'type', UML13EA::TypeExpression
449
+ UML13EA::Action.contains_one_uni 'recurrence', UML13EA::IterationExpression
450
+ UML13EA::Action.contains_one_uni 'target', UML13EA::ObjectSetExpression
451
+ UML13EA::Action.contains_one_uni 'script', UML13EA::ActionExpression
452
+ UML13EA::Action.contains_many_uni 'actualArgument', UML13EA::Argument
453
+ UML13EA::StateMachine.many_to_one 'context', UML13EA::ModelElement, 'behavior'
454
+ UML13EA::StateMachine.contains_many_uni 'transitions', UML13EA::Transition
455
+ UML13EA::StateMachine.contains_one_uni 'top', UML13EA::State, :lowerBound => 1
456
+ UML13EA::Operation.one_to_many 'occurrence', UML13EA::CallEvent, 'operation'
457
+ UML13EA::ClassifierInState.has_one 'type', UML13EA::Classifier, :lowerBound => 1
458
+ UML13EA::ClassifierInState.has_many 'inState', UML13EA::State
459
+ UML13EA::Link.contains_many_uni 'connection', UML13EA::LinkEnd, :lowerBound => 2
460
+ UML13EA::Link.has_one 'association', UML13EA::Association, :lowerBound => 1
461
+ UML13EA::PresentationElement.many_to_many 'subject', UML13EA::ModelElement, 'presentation'
462
+ UML13EA::AssociationRole.contains_one_uni 'multiplicity', UML13EA::Multiplicity
463
+ UML13EA::AssociationRole.has_one 'base', UML13EA::Association
464
+ UML13EA::Diagram.has_one 'owner', UML13EA::ModelElement, :lowerBound => 1
465
+ UML13EA::ActionSequence.contains_many_uni 'action', UML13EA::Action
466
+ UML13EA::Constraint.contains_one_uni 'body', UML13EA::BooleanExpression
467
+ UML13EA::Constraint.many_to_many 'constrainedElement', UML13EA::ModelElement, 'constraint', :lowerBound => 1
468
+ UML13EA::SubactivityState.contains_one_uni 'dynamicArguments', UML13EA::ArgListsExpression
469
+ UML13EA::AssociationEnd.contains_many 'qualifier', UML13EA::Attribute, 'associationEnd'
470
+ UML13EA::Attribute.contains_one_uni 'initialValue', UML13EA::Expression
471
+ UML13EA::Flow.many_to_many 'source', UML13EA::ModelElement, 'sourceFlow'
472
+ UML13EA::Flow.many_to_many 'target', UML13EA::ModelElement, 'targetFlow'
473
+ UML13EA::Guard.contains_one_uni 'expression', UML13EA::BooleanExpression
474
+ UML13EA::CreateAction.has_one 'instantiation', UML13EA::Classifier, :lowerBound => 1
475
+ UML13EA::Namespace.contains_many 'ownedElement', UML13EA::ModelElement, 'namespace'
476
+ UML13EA::Parameter.contains_one_uni 'defaultValue', UML13EA::Expression
477
+ UML13EA::Parameter.many_to_many 'state', UML13EA::ObjectFlowState, 'parameter'
478
+ UML13EA::Parameter.has_one 'type', UML13EA::Classifier, :lowerBound => 1
479
+ UML13EA::Binding.has_many 'argument', UML13EA::ModelElement, :lowerBound => 1
480
+ UML13EA::Event.contains_many_uni 'parameters', UML13EA::Parameter
481
+ UML13EA::Dependency.many_to_many 'supplier', UML13EA::ModelElement, 'supplierDependency', :opposite_lowerBound => 1
482
+ UML13EA::Dependency.many_to_many 'client', UML13EA::ModelElement, 'clientDependency', :opposite_lowerBound => 1
483
+ UML13EA::Package.contains_many 'importedElement', UML13EA::ElementImport, 'package'
484
+ UML13EA::Classifier.contains_many 'feature', UML13EA::Feature, 'owner'
485
+ UML13EA::Stereotype.one_to_many 'extendedElement', UML13EA::ModelElement, 'stereotype'
486
+ UML13EA::Stereotype.has_many 'requiredTag', UML13EA::TaggedValue
487
+ UML13EA::ComponentInstance.has_many 'resident', UML13EA::Instance
488
+ UML13EA::SignalEvent.many_to_one 'signal', UML13EA::Signal, 'occurrence', :lowerBound => 1
489
+ UML13EA::Instance.contains_many_uni 'slot', UML13EA::AttributeLink
490
+ UML13EA::Instance.one_to_many 'linkEnd', UML13EA::LinkEnd, 'instance'
491
+ UML13EA::Instance.has_many 'classifier', UML13EA::Classifier, :lowerBound => 1
492
+ UML13EA::AssociationEndRole.has_many 'availableQualifier', UML13EA::Attribute
493
+ UML13EA::AssociationEndRole.has_one 'base', UML13EA::AssociationEnd
494
+ UML13EA::Extend.many_to_one 'extension', UML13EA::UseCase, 'extend'
495
+ UML13EA::Extend.contains_one_uni 'condition', UML13EA::BooleanExpression
496
+ UML13EA::Extend.has_many 'extensionPoint', UML13EA::ExtensionPoint, :lowerBound => 1
497
+ UML13EA::Extend.has_one 'base', UML13EA::UseCase, :lowerBound => 1
498
+ UML13EA::Argument.contains_one_uni 'value', UML13EA::Expression
499
+ UML13EA::TemplateParameter.has_one 'modelElement', UML13EA::ModelElement
500
+ UML13EA::TemplateParameter.has_one 'defaultElement', UML13EA::ModelElement
501
+ UML13EA::ActionState.contains_one_uni 'dynamicArguments', UML13EA::ArgListsExpression
502
+ UML13EA::GeneralizableElement.one_to_many 'specialization', UML13EA::Generalization, 'supertype'
503
+ UML13EA::GeneralizableElement.one_to_many 'generalization', UML13EA::Generalization, 'subtype'
504
+ UML13EA::StateVertex.one_to_many 'incoming', UML13EA::Transition, 'target', :opposite_lowerBound => 1
505
+ UML13EA::StateVertex.one_to_many 'outgoing', UML13EA::Transition, 'source', :opposite_lowerBound => 1
506
+ UML13EA::CompositeState.contains_many 'substate', UML13EA::StateVertex, 'container', :lowerBound => 1
507
+ UML13EA::ModelElement.contains_many 'taggedValue', UML13EA::TaggedValue, 'modelElement'
508
+ UML13EA::StructuralFeature.contains_one_uni 'multiplicity', UML13EA::Multiplicity
509
+ UML13EA::StructuralFeature.has_one 'type', UML13EA::Classifier, :lowerBound => 1
510
+ UML13EA::Transition.has_one 'trigger', UML13EA::Event
511
+ UML13EA::Transition.contains_one_uni 'effect', UML13EA::Action
512
+ UML13EA::Transition.contains_one_uni 'guard', UML13EA::Guard
513
+ UML13EA::NodeInstance.has_many 'resident', UML13EA::ComponentInstance
514
+ UML13EA::Component.contains_many 'residentElement', UML13EA::ElementResidence, 'implementationLocation'
515
+ UML13EA::Component.many_to_many 'deploymentLocation', UML13EA::Node, 'resident'
516
+ UML13EA::Message.has_one 'action', UML13EA::Action, :lowerBound => 1
517
+ UML13EA::Message.has_one 'communicationConnection', UML13EA::AssociationRole
518
+ UML13EA::Message.has_many 'predecessor', UML13EA::Message
519
+ UML13EA::Message.has_one 'receiver', UML13EA::ClassifierRole, :lowerBound => 1
520
+ UML13EA::Message.has_one 'sender', UML13EA::ClassifierRole, :lowerBound => 1
521
+ UML13EA::Message.has_one 'activator', UML13EA::Message
522
+ UML13EA::Interaction.contains_many 'message', UML13EA::Message, 'interaction', :lowerBound => 1
523
+ UML13EA::ModelElement.one_to_many 'elementResidence', UML13EA::ElementResidence, 'resident'
524
+ UML13EA::ModelElement.contains_many_uni 'templateParameter', UML13EA::TemplateParameter
525
+ UML13EA::ModelElement.one_to_many 'elementImport', UML13EA::ElementImport, 'modelElement'
526
+ UML13EA::Enumeration.contains_many_uni 'literal', UML13EA::EnumerationLiteral, :lowerBound => 1
527
+ UML13EA::Reception.many_to_one 'signal', UML13EA::Signal, 'reception'
528
+ UML13EA::Association.contains_many 'connection', UML13EA::AssociationEnd, 'association', :lowerBound => 2
529
+ UML13EA::Include.many_to_one 'base', UML13EA::UseCase, 'include'
530
+ UML13EA::Include.has_one 'addition', UML13EA::UseCase, :lowerBound => 1
531
+ UML13EA::Classifier.many_to_many 'participant', UML13EA::AssociationEnd, 'specification'
532
+ UML13EA::Classifier.one_to_many 'associationEnd', UML13EA::AssociationEnd, 'type'
533
+ UML13EA::Stimulus.has_one 'dispatchAction', UML13EA::Action, :lowerBound => 1
534
+ UML13EA::Stimulus.has_one 'communicationLink', UML13EA::Link
535
+ UML13EA::Stimulus.has_one 'receiver', UML13EA::Instance, :lowerBound => 1
536
+ UML13EA::Stimulus.has_one 'sender', UML13EA::Instance, :lowerBound => 1
537
+ UML13EA::Stimulus.has_many 'argument', UML13EA::Instance
538
+ UML13EA::State.contains_one_uni 'doActivity', UML13EA::Action
539
+ UML13EA::State.contains_many_uni 'internalTransition', UML13EA::Transition
540
+ UML13EA::State.has_many 'deferrableEvent', UML13EA::Event
541
+ UML13EA::State.contains_one_uni 'exit', UML13EA::Action
542
+ UML13EA::State.contains_one_uni 'entry', UML13EA::Action
543
+ UML13EA::Collaboration.has_one 'representedOperation', UML13EA::Operation
544
+ UML13EA::Collaboration.has_one 'representedClassifier', UML13EA::Classifier
545
+ UML13EA::Collaboration.has_many 'constrainingElement', UML13EA::ModelElement
546
+ UML13EA::Collaboration.contains_many 'interaction', UML13EA::Interaction, 'context'
547
+ UML13EA::CallAction.has_one 'operation', UML13EA::Operation, :lowerBound => 1
548
+ UML13EA::UseCase.has_many 'extensionPoint', UML13EA::ExtensionPoint
549
+ UML13EA::ActivityModel.contains_many_uni 'partition', UML13EA::Partition
550
+ UML13EA::Interaction.contains_many_uni 'link', UML13EA::Link
551
+ UML13EA::LinkEnd.has_one 'associationEnd', UML13EA::AssociationEnd, :lowerBound => 1
552
+ UML13EA::LinkEnd.has_one 'participant', UML13EA::Instance, :lowerBound => 1
553
+ UML13EA::BehavioralFeature.many_to_many 'raisedSignal', UML13EA::Signal, 'context'
554
+ UML13EA::BehavioralFeature.contains_many_uni 'parameter', UML13EA::Parameter
555
+ UML13EA::SubmachineState.has_one 'submachine', UML13EA::StateMachine, :lowerBound => 1
556
+ UML13EA::Multiplicity.contains_many_uni 'range', UML13EA::MultiplicityRange, :lowerBound => 1
557
+ UML13EA::ObjectFlowState.has_one 'type', UML13EA::Classifier, :lowerBound => 1
558
+ UML13EA::ObjectFlowState.has_one 'available', UML13EA::Parameter, :lowerBound => 1
559
+ UML13EA::AttributeLink.has_one 'value', UML13EA::Instance, :lowerBound => 1
560
+ UML13EA::AttributeLink.has_one 'attribute', UML13EA::Attribute, :lowerBound => 1
561
+ UML13EA::TimeEvent.contains_one_uni 'when', UML13EA::TimeExpression
562
+ UML13EA::Abstraction.contains_one_uni 'mapping', UML13EA::MappingExpression