xmi 0.5.3 → 0.5.4
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.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +34 -31
- data/lib/xmi/extension.rb +4 -12
- data/lib/xmi/parser_pipeline.rb +70 -0
- data/lib/xmi/root.rb +3 -12
- data/lib/xmi/sparx/connector/appearance.rb +27 -0
- data/lib/xmi/sparx/connector/connector.rb +52 -0
- data/lib/xmi/sparx/connector/end_base.rb +56 -0
- data/lib/xmi/sparx/connector/end_constraint.rb +33 -0
- data/lib/xmi/sparx/connector/end_modifiers.rb +19 -0
- data/lib/xmi/sparx/connector/end_role.rb +21 -0
- data/lib/xmi/sparx/connector/end_style.rb +17 -0
- data/lib/xmi/sparx/connector/end_type.rb +21 -0
- data/lib/xmi/sparx/connector/labels.rb +27 -0
- data/lib/xmi/sparx/connector/model.rb +19 -0
- data/lib/xmi/sparx/connector/properties.rb +19 -0
- data/lib/xmi/sparx/connector.rb +15 -233
- data/lib/xmi/sparx/element/association.rb +58 -0
- data/lib/xmi/sparx/element/attribute.rb +58 -0
- data/lib/xmi/sparx/element/bounds.rb +19 -0
- data/lib/xmi/sparx/element/code.rb +19 -0
- data/lib/xmi/sparx/element/containment.rb +19 -0
- data/lib/xmi/sparx/element/coords.rb +19 -0
- data/lib/xmi/sparx/element/documentation.rb +17 -0
- data/lib/xmi/sparx/element/element.rb +62 -0
- data/lib/xmi/sparx/element/extended_properties.rb +21 -0
- data/lib/xmi/sparx/element/flags.rb +29 -0
- data/lib/xmi/sparx/element/links.rb +22 -0
- data/lib/xmi/sparx/element/model.rb +26 -0
- data/lib/xmi/sparx/element/package_properties.rb +21 -0
- data/lib/xmi/sparx/element/paths.rb +17 -0
- data/lib/xmi/sparx/element/project.rb +29 -0
- data/lib/xmi/sparx/element/properties.rb +41 -0
- data/lib/xmi/sparx/element/stereotype.rb +17 -0
- data/lib/xmi/sparx/element/style.rb +17 -0
- data/lib/xmi/sparx/element/styleex.rb +17 -0
- data/lib/xmi/sparx/element/tag.rb +32 -0
- data/lib/xmi/sparx/element/times.rb +23 -0
- data/lib/xmi/sparx/element/xrefs.rb +17 -0
- data/lib/xmi/sparx/element.rb +28 -445
- data/lib/xmi/sparx/extension.rb +4 -12
- data/lib/xmi/sparx/gml/application_schema.rb +26 -0
- data/lib/xmi/sparx/gml/code_list.rb +23 -0
- data/lib/xmi/sparx/gml/data_type.rb +18 -0
- data/lib/xmi/sparx/gml/enumeration.rb +18 -0
- data/lib/xmi/sparx/gml/feature_type.rb +21 -0
- data/lib/xmi/sparx/gml/property.rb +24 -0
- data/lib/xmi/sparx/gml/shared_attributes.rb +39 -0
- data/lib/xmi/sparx/gml/type.rb +18 -0
- data/lib/xmi/sparx/gml/union.rb +18 -0
- data/lib/xmi/sparx/gml.rb +10 -125
- data/lib/xmi/sparx/index.rb +248 -0
- data/lib/xmi/sparx/mappings/base_mapping.rb +13 -137
- data/lib/xmi/sparx/root.rb +10 -11
- data/lib/xmi/sparx.rb +1 -0
- data/lib/xmi/uml/annotated_element.rb +16 -0
- data/lib/xmi/uml/association_generalization.rb +20 -0
- data/lib/xmi/uml/bounds.rb +43 -0
- data/lib/xmi/uml/default_value.rb +42 -0
- data/lib/xmi/uml/diagram.rb +25 -0
- data/lib/xmi/uml/member_end.rb +16 -0
- data/lib/xmi/uml/owned_attribute.rb +31 -0
- data/lib/xmi/uml/owned_comment.rb +29 -0
- data/lib/xmi/uml/owned_element.rb +33 -0
- data/lib/xmi/uml/owned_end.rb +34 -0
- data/lib/xmi/uml/owned_literal.rb +23 -0
- data/lib/xmi/uml/owned_operation.rb +22 -0
- data/lib/xmi/uml/owned_parameter.rb +29 -0
- data/lib/xmi/uml/package_import.rb +30 -0
- data/lib/xmi/uml/packaged_element.rb +49 -0
- data/lib/xmi/uml/precondition.rb +22 -0
- data/lib/xmi/uml/profile.rb +43 -0
- data/lib/xmi/uml/profile_application.rb +34 -0
- data/lib/xmi/uml/specification.rb +20 -0
- data/lib/xmi/uml/type.rb +18 -0
- data/lib/xmi/uml/uml_model.rb +29 -0
- data/lib/xmi/uml.rb +27 -502
- data/lib/xmi/version.rb +1 -1
- data/lib/xmi/xmi_identity.rb +46 -0
- data/lib/xmi.rb +11 -7
- metadata +67 -2
- data/lib/xmi/index.rb +0 -243
data/lib/xmi/sparx/connector.rb
CHANGED
|
@@ -3,239 +3,21 @@
|
|
|
3
3
|
module Xmi
|
|
4
4
|
module Sparx
|
|
5
5
|
module Connector
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
attribute :target_scope, :string
|
|
22
|
-
|
|
23
|
-
xml do
|
|
24
|
-
root "role"
|
|
25
|
-
|
|
26
|
-
map_attribute :name, to: :name
|
|
27
|
-
map_attribute :visibility, to: :visibility
|
|
28
|
-
map_attribute :targetScope, to: :target_scope
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
class EndType < Lutaml::Model::Serializable
|
|
33
|
-
attribute :aggregation, :string
|
|
34
|
-
attribute :multiplicity, :string
|
|
35
|
-
attribute :containment, :string
|
|
36
|
-
|
|
37
|
-
xml do
|
|
38
|
-
root "type"
|
|
39
|
-
|
|
40
|
-
map_attribute :aggregation, to: :aggregation
|
|
41
|
-
map_attribute :multiplicity, to: :multiplicity
|
|
42
|
-
map_attribute :containment, to: :containment
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
class EndModifiers < Lutaml::Model::Serializable
|
|
47
|
-
attribute :is_ordered, :boolean
|
|
48
|
-
attribute :is_navigable, :boolean
|
|
49
|
-
|
|
50
|
-
xml do
|
|
51
|
-
root "type"
|
|
52
|
-
|
|
53
|
-
map_attribute "isOrdered", to: :is_ordered
|
|
54
|
-
map_attribute "isNavigable", to: :is_navigable
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
class EndConstraint < Lutaml::Model::Serializable
|
|
59
|
-
attribute :name, :string
|
|
60
|
-
attribute :type, ::Xmi::Type::XmiType
|
|
61
|
-
attribute :weight, :float
|
|
62
|
-
attribute :status, :string
|
|
63
|
-
|
|
64
|
-
xml do
|
|
65
|
-
root "constraint"
|
|
66
|
-
|
|
67
|
-
map_attribute "name", to: :name
|
|
68
|
-
map_attribute "type", to: :type
|
|
69
|
-
map_attribute "weight", to: :weight
|
|
70
|
-
map_attribute "status", to: :status
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
class EndConstraints < Lutaml::Model::Serializable
|
|
75
|
-
attribute :constraint, EndConstraint, collection: true
|
|
76
|
-
|
|
77
|
-
xml do
|
|
78
|
-
root "constraints"
|
|
79
|
-
|
|
80
|
-
map_element "constraint", to: :constraint, value_map: VALUE_MAP
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
class EndStyle < Lutaml::Model::Serializable
|
|
85
|
-
attribute :value, :string
|
|
86
|
-
|
|
87
|
-
xml do
|
|
88
|
-
root "style"
|
|
89
|
-
|
|
90
|
-
map_attribute "value", to: :value
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
class End < Lutaml::Model::Serializable
|
|
95
|
-
attribute :idref, ::Xmi::Type::XmiIdRef
|
|
96
|
-
attribute :model, Model
|
|
97
|
-
attribute :role, EndRole
|
|
98
|
-
attribute :type, EndType
|
|
99
|
-
attribute :constraints, EndConstraints
|
|
100
|
-
attribute :modifiers, EndModifiers
|
|
101
|
-
attribute :style, EndStyle
|
|
102
|
-
attribute :documentation, Element::Documentation
|
|
103
|
-
attribute :xrefs, Element::Xrefs
|
|
104
|
-
attribute :tags, Element::Tags
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
class Source < End
|
|
108
|
-
xml do
|
|
109
|
-
root "source"
|
|
110
|
-
|
|
111
|
-
map_attribute "idref", to: :idref
|
|
112
|
-
|
|
113
|
-
map_element "model", to: :model, render_nil: true
|
|
114
|
-
map_element "role", to: :role, render_nil: true
|
|
115
|
-
map_element "type", to: :type, render_nil: true
|
|
116
|
-
map_element "constraints", to: :constraints, render_nil: true
|
|
117
|
-
map_element "modifiers", to: :modifiers, render_nil: true
|
|
118
|
-
map_element "style", to: :style, render_nil: true
|
|
119
|
-
map_element "documentation", to: :documentation, value_map: VALUE_MAP
|
|
120
|
-
map_element "xrefs", to: :xrefs, render_nil: true
|
|
121
|
-
map_element "tags", to: :tags, render_nil: true
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
class Target < End
|
|
126
|
-
xml do
|
|
127
|
-
root "target"
|
|
128
|
-
|
|
129
|
-
map_attribute "idref", to: :idref
|
|
130
|
-
|
|
131
|
-
map_element "model", to: :model, render_nil: true
|
|
132
|
-
map_element "role", to: :role, render_nil: true
|
|
133
|
-
map_element "type", to: :type, render_nil: true
|
|
134
|
-
map_element "constraints", to: :constraints, render_nil: true
|
|
135
|
-
map_element "modifiers", to: :modifiers, render_nil: true
|
|
136
|
-
map_element "style", to: :style, render_nil: true
|
|
137
|
-
map_element "documentation", to: :documentation, value_map: VALUE_MAP
|
|
138
|
-
map_element "xrefs", to: :xrefs, render_nil: true
|
|
139
|
-
map_element "tags", to: :tags, render_nil: true
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
class Properties < Lutaml::Model::Serializable
|
|
144
|
-
attribute :ea_type, :string
|
|
145
|
-
attribute :direction, :string
|
|
146
|
-
|
|
147
|
-
xml do
|
|
148
|
-
root "properties"
|
|
149
|
-
|
|
150
|
-
map_attribute :ea_type, to: :ea_type
|
|
151
|
-
map_attribute :direction, to: :direction
|
|
152
|
-
end
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
class Appearance < Lutaml::Model::Serializable
|
|
156
|
-
attribute :linemode, :integer
|
|
157
|
-
attribute :linecolor, :integer
|
|
158
|
-
attribute :linewidth, :integer
|
|
159
|
-
attribute :seqno, :integer
|
|
160
|
-
attribute :headStyle, :integer
|
|
161
|
-
attribute :lineStyle, :integer
|
|
162
|
-
|
|
163
|
-
xml do
|
|
164
|
-
root "appearance"
|
|
165
|
-
|
|
166
|
-
map_attribute :linemode, to: :linemode
|
|
167
|
-
map_attribute :linecolor, to: :linecolor
|
|
168
|
-
map_attribute :linewidth, to: :linewidth
|
|
169
|
-
map_attribute :seqno, to: :seqno
|
|
170
|
-
map_attribute :headStyle, to: :headStyle
|
|
171
|
-
map_attribute :lineStyle, to: :lineStyle
|
|
172
|
-
end
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
class Labels < Lutaml::Model::Serializable
|
|
176
|
-
attribute :rb, :string
|
|
177
|
-
attribute :lb, :string
|
|
178
|
-
attribute :mb, :string
|
|
179
|
-
attribute :rt, :string
|
|
180
|
-
attribute :lt, :string
|
|
181
|
-
attribute :mt, :string
|
|
182
|
-
|
|
183
|
-
xml do
|
|
184
|
-
root "labels"
|
|
185
|
-
|
|
186
|
-
map_attribute :rb, to: :rb
|
|
187
|
-
map_attribute :lb, to: :lb
|
|
188
|
-
map_attribute :mb, to: :mb
|
|
189
|
-
map_attribute :rt, to: :rt
|
|
190
|
-
map_attribute :lt, to: :lt
|
|
191
|
-
map_attribute :mt, to: :mt
|
|
192
|
-
end
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
class Connector < Lutaml::Model::Serializable
|
|
196
|
-
attribute :name, :string
|
|
197
|
-
attribute :idref, ::Xmi::Type::XmiIdRef
|
|
198
|
-
attribute :source, Source
|
|
199
|
-
attribute :target, Target
|
|
200
|
-
attribute :model, Model
|
|
201
|
-
attribute :properties, Properties
|
|
202
|
-
attribute :documentation, Element::Documentation
|
|
203
|
-
attribute :appearance, Appearance
|
|
204
|
-
attribute :labels, Labels
|
|
205
|
-
attribute :extended_properties, Element::ExtendedProperties
|
|
206
|
-
attribute :style, Element::Style
|
|
207
|
-
attribute :tags, Element::Tags
|
|
208
|
-
attribute :xrefs, Element::Xrefs
|
|
209
|
-
|
|
210
|
-
xml do
|
|
211
|
-
root "element"
|
|
212
|
-
|
|
213
|
-
map_attribute "name", to: :name
|
|
214
|
-
map_attribute "idref", to: :idref
|
|
215
|
-
|
|
216
|
-
map_element "source", to: :source
|
|
217
|
-
map_element "target", to: :target
|
|
218
|
-
map_element "model", to: :model
|
|
219
|
-
map_element "properties", to: :properties
|
|
220
|
-
map_element "documentation", to: :documentation, value_map: VALUE_MAP
|
|
221
|
-
map_element "appearance", to: :appearance
|
|
222
|
-
map_element "labels", to: :labels, render_nil: true
|
|
223
|
-
map_element "extendedProperties", to: :extended_properties
|
|
224
|
-
map_element "style", to: :style, render_nil: true
|
|
225
|
-
map_element "xrefs", to: :xrefs, render_nil: true
|
|
226
|
-
map_element "tags", to: :tags, render_nil: true
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
class Connectors < Lutaml::Model::Serializable
|
|
231
|
-
attribute :connector, Connector, collection: true
|
|
232
|
-
|
|
233
|
-
xml do
|
|
234
|
-
root "connectors"
|
|
235
|
-
|
|
236
|
-
map_element "connector", to: :connector, value_map: VALUE_MAP
|
|
237
|
-
end
|
|
238
|
-
end
|
|
6
|
+
autoload :Model, "xmi/sparx/connector/model"
|
|
7
|
+
autoload :EndRole, "xmi/sparx/connector/end_role"
|
|
8
|
+
autoload :EndType, "xmi/sparx/connector/end_type"
|
|
9
|
+
autoload :EndModifiers, "xmi/sparx/connector/end_modifiers"
|
|
10
|
+
autoload :EndConstraint, "xmi/sparx/connector/end_constraint"
|
|
11
|
+
autoload :EndConstraints, "xmi/sparx/connector/end_constraint"
|
|
12
|
+
autoload :EndStyle, "xmi/sparx/connector/end_style"
|
|
13
|
+
autoload :End, "xmi/sparx/connector/end_base"
|
|
14
|
+
autoload :Source, "xmi/sparx/connector/end_base"
|
|
15
|
+
autoload :Target, "xmi/sparx/connector/end_base"
|
|
16
|
+
autoload :Properties, "xmi/sparx/connector/properties"
|
|
17
|
+
autoload :Appearance, "xmi/sparx/connector/appearance"
|
|
18
|
+
autoload :Labels, "xmi/sparx/connector/labels"
|
|
19
|
+
autoload :Connector, "xmi/sparx/connector/connector"
|
|
20
|
+
autoload :Connectors, "xmi/sparx/connector/connector"
|
|
239
21
|
end
|
|
240
22
|
end
|
|
241
23
|
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Association < Lutaml::Model::Serializable
|
|
7
|
+
attribute :id, ::Xmi::Type::XmiId
|
|
8
|
+
attribute :start, :string
|
|
9
|
+
attribute :end, :string
|
|
10
|
+
attribute :name, :string, default: -> { "Association" }
|
|
11
|
+
|
|
12
|
+
xml do
|
|
13
|
+
root "Association"
|
|
14
|
+
|
|
15
|
+
map_attribute "id", to: :id
|
|
16
|
+
map_attribute "start", to: :start
|
|
17
|
+
map_attribute "end", to: :end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Generalization < Association
|
|
22
|
+
attribute :name, :string, default: -> { "Generalization" }
|
|
23
|
+
|
|
24
|
+
xml do
|
|
25
|
+
root "Generalization"
|
|
26
|
+
|
|
27
|
+
map_attribute "id", to: :id
|
|
28
|
+
map_attribute "start", to: :start
|
|
29
|
+
map_attribute "end", to: :end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
class Aggregation < Association
|
|
34
|
+
attribute :name, :string, default: -> { "Aggregation" }
|
|
35
|
+
|
|
36
|
+
xml do
|
|
37
|
+
root "Aggregation"
|
|
38
|
+
|
|
39
|
+
map_attribute "id", to: :id
|
|
40
|
+
map_attribute "start", to: :start
|
|
41
|
+
map_attribute "end", to: :end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
class NoteLink < Association
|
|
46
|
+
attribute :name, :string, default: -> { "NoteLink" }
|
|
47
|
+
|
|
48
|
+
xml do
|
|
49
|
+
root "NoteLink"
|
|
50
|
+
|
|
51
|
+
map_attribute "id", to: :id
|
|
52
|
+
map_attribute "start", to: :start
|
|
53
|
+
map_attribute "end", to: :end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Attribute < Lutaml::Model::Serializable
|
|
7
|
+
attribute :idref, ::Xmi::Type::XmiIdRef
|
|
8
|
+
attribute :name, :string
|
|
9
|
+
attribute :scope, :string
|
|
10
|
+
attribute :initial, :string
|
|
11
|
+
attribute :documentation, Documentation
|
|
12
|
+
attribute :options, :string
|
|
13
|
+
attribute :style, :string
|
|
14
|
+
attribute :tags, :string, collection: true
|
|
15
|
+
attribute :model, Model
|
|
16
|
+
attribute :properties, Properties
|
|
17
|
+
attribute :coords, Coords
|
|
18
|
+
attribute :containment, Containment
|
|
19
|
+
attribute :stereotype, Stereotype
|
|
20
|
+
attribute :bounds, Bounds
|
|
21
|
+
attribute :styleex, Styleex
|
|
22
|
+
attribute :xrefs, Xrefs
|
|
23
|
+
|
|
24
|
+
xml do
|
|
25
|
+
root "attribute"
|
|
26
|
+
|
|
27
|
+
map_attribute "idref", to: :idref
|
|
28
|
+
map_attribute "name", to: :name
|
|
29
|
+
map_attribute "scope", to: :scope
|
|
30
|
+
|
|
31
|
+
map_element "initial", to: :initial
|
|
32
|
+
map_element "options", to: :options
|
|
33
|
+
map_element "style", to: :style
|
|
34
|
+
map_element "tags", to: :tags, value_map: VALUE_MAP
|
|
35
|
+
map_element "documentation", to: :documentation
|
|
36
|
+
map_element "model", to: :model
|
|
37
|
+
map_element "properties", to: :properties
|
|
38
|
+
map_element "coords", to: :coords
|
|
39
|
+
map_element "containment", to: :containment
|
|
40
|
+
map_element "stereotype", to: :stereotype
|
|
41
|
+
map_element "bounds", to: :bounds
|
|
42
|
+
map_element "styleex", to: :styleex
|
|
43
|
+
map_element "xrefs", to: :xrefs
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
class Attributes < Lutaml::Model::Serializable
|
|
48
|
+
attribute :attribute, Attribute, collection: true
|
|
49
|
+
|
|
50
|
+
xml do
|
|
51
|
+
root "attributes"
|
|
52
|
+
|
|
53
|
+
map_element "attribute", to: :attribute, value_map: VALUE_MAP
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Bounds < Lutaml::Model::Serializable
|
|
7
|
+
attribute :lower, :integer
|
|
8
|
+
attribute :upper, :integer
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
root "bounds"
|
|
12
|
+
|
|
13
|
+
map_attribute "lower", to: :lower
|
|
14
|
+
map_attribute "upper", to: :upper
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Code < Lutaml::Model::Serializable
|
|
7
|
+
attribute :gentype, :string
|
|
8
|
+
attribute :product_name, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
root "code"
|
|
12
|
+
|
|
13
|
+
map_attribute "gentype", to: :gentype
|
|
14
|
+
map_attribute "product_name", to: :product_name
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Containment < Lutaml::Model::Serializable
|
|
7
|
+
attribute :containment, :string
|
|
8
|
+
attribute :position, :integer
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
root "containment"
|
|
12
|
+
|
|
13
|
+
map_attribute "containment", to: :containment
|
|
14
|
+
map_attribute "position", to: :position
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Coords < Lutaml::Model::Serializable
|
|
7
|
+
attribute :ordered, :integer
|
|
8
|
+
attribute :scale, :integer
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
root "coords"
|
|
12
|
+
|
|
13
|
+
map_attribute "ordered", to: :ordered
|
|
14
|
+
map_attribute "scale", to: :scale
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Documentation < Lutaml::Model::Serializable
|
|
7
|
+
attribute :value, :string
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
root "documentation"
|
|
11
|
+
|
|
12
|
+
map_attribute "value", to: :value
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Element < Lutaml::Model::Serializable
|
|
7
|
+
attribute :idref, ::Xmi::Type::XmiIdRef
|
|
8
|
+
attribute :type, ::Xmi::Type::XmiType
|
|
9
|
+
attribute :name, :string
|
|
10
|
+
attribute :scope, :string
|
|
11
|
+
attribute :model, Model
|
|
12
|
+
attribute :properties, Properties
|
|
13
|
+
attribute :project, Project
|
|
14
|
+
attribute :code, Code
|
|
15
|
+
attribute :style, Style
|
|
16
|
+
attribute :tags, Tags
|
|
17
|
+
attribute :xrefs, Xrefs
|
|
18
|
+
attribute :extended_properties, ExtendedProperties
|
|
19
|
+
attribute :package_properties, PackageProperties
|
|
20
|
+
attribute :paths, Paths
|
|
21
|
+
attribute :times, Times
|
|
22
|
+
attribute :flags, Flags
|
|
23
|
+
attribute :links, Links, collection: true
|
|
24
|
+
attribute :attributes, Attributes
|
|
25
|
+
|
|
26
|
+
xml do
|
|
27
|
+
root "element"
|
|
28
|
+
|
|
29
|
+
map_attribute "idref", to: :idref
|
|
30
|
+
map_attribute "type", to: :type
|
|
31
|
+
map_attribute "name", to: :name
|
|
32
|
+
map_attribute "scope", to: :scope
|
|
33
|
+
|
|
34
|
+
map_element "model", to: :model
|
|
35
|
+
map_element "properties", to: :properties
|
|
36
|
+
map_element "project", to: :project
|
|
37
|
+
map_element "code", to: :code
|
|
38
|
+
map_element "style", to: :style
|
|
39
|
+
map_element "tags", to: :tags
|
|
40
|
+
map_element "xrefs", to: :xrefs
|
|
41
|
+
map_element "extendedProperties", to: :extended_properties
|
|
42
|
+
map_element "packageproperties", to: :package_properties
|
|
43
|
+
map_element "paths", to: :paths
|
|
44
|
+
map_element "times", to: :times
|
|
45
|
+
map_element "flags", to: :flags
|
|
46
|
+
map_element "links", to: :links
|
|
47
|
+
map_element "attributes", to: :attributes
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
class Elements < Lutaml::Model::Serializable
|
|
52
|
+
attribute :element, Element, collection: true
|
|
53
|
+
|
|
54
|
+
xml do
|
|
55
|
+
root "elements"
|
|
56
|
+
|
|
57
|
+
map_element "element", to: :element, value_map: VALUE_MAP
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class ExtendedProperties < Lutaml::Model::Serializable
|
|
7
|
+
attribute :tagged, :string
|
|
8
|
+
attribute :package_name, :string
|
|
9
|
+
attribute :virtual_inheritance, :integer
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
root "extendedProperties"
|
|
13
|
+
|
|
14
|
+
map_attribute "tagged", to: :tagged
|
|
15
|
+
map_attribute "package_name", to: :package_name
|
|
16
|
+
map_attribute "virtualInheritance", to: :virtual_inheritance
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Flags < Lutaml::Model::Serializable
|
|
7
|
+
attribute :is_controlled, :integer
|
|
8
|
+
attribute :is_protected, :integer
|
|
9
|
+
attribute :batch_save, :integer
|
|
10
|
+
attribute :batch_load, :integer
|
|
11
|
+
attribute :used_td, :integer
|
|
12
|
+
attribute :log_xml, :integer
|
|
13
|
+
attribute :package_flags, :string
|
|
14
|
+
|
|
15
|
+
xml do
|
|
16
|
+
root "flags"
|
|
17
|
+
|
|
18
|
+
map_attribute "iscontrolled", to: :is_controlled
|
|
19
|
+
map_attribute "isprotected", to: :is_protected
|
|
20
|
+
map_attribute "batchsave", to: :batch_save
|
|
21
|
+
map_attribute "batchload", to: :batch_load
|
|
22
|
+
map_attribute "usedtd", to: :used_td
|
|
23
|
+
map_attribute "logxml", to: :log_xml
|
|
24
|
+
map_attribute "packageFlags", to: :package_flags
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Links < Lutaml::Model::Serializable
|
|
7
|
+
attribute :association, Association, collection: true
|
|
8
|
+
attribute :generalization, Generalization, collection: true
|
|
9
|
+
attribute :note_link, NoteLink, collection: true
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
root "links"
|
|
13
|
+
|
|
14
|
+
map_element "Association", to: :association, value_map: VALUE_MAP
|
|
15
|
+
map_element "Generalization", to: :generalization,
|
|
16
|
+
value_map: VALUE_MAP
|
|
17
|
+
map_element "NoteLink", to: :note_link, value_map: VALUE_MAP
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Model < Lutaml::Model::Serializable
|
|
7
|
+
attribute :package, :string
|
|
8
|
+
attribute :package2, :string
|
|
9
|
+
attribute :tpos, :integer
|
|
10
|
+
attribute :ea_localid, :string
|
|
11
|
+
attribute :ea_eleType, :string
|
|
12
|
+
|
|
13
|
+
xml do
|
|
14
|
+
root "model"
|
|
15
|
+
namespace ::Xmi::Namespace::Omg::Uml
|
|
16
|
+
|
|
17
|
+
map_attribute "package", to: :package
|
|
18
|
+
map_attribute "package2", to: :package2
|
|
19
|
+
map_attribute "tpos", to: :tpos
|
|
20
|
+
map_attribute "ea_localid", to: :ea_localid
|
|
21
|
+
map_attribute "ea_eleType", to: :ea_eleType
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class PackageProperties < Lutaml::Model::Serializable
|
|
7
|
+
attribute :version, :string
|
|
8
|
+
attribute :xmiver, :string
|
|
9
|
+
attribute :tpos, :string
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
root "packagedproperties"
|
|
13
|
+
|
|
14
|
+
map_attribute "version", to: :version
|
|
15
|
+
map_attribute "xmiver", to: :xmiver
|
|
16
|
+
map_attribute "tpos", to: :tpos
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module Sparx
|
|
5
|
+
module Element
|
|
6
|
+
class Paths < Lutaml::Model::Serializable
|
|
7
|
+
attribute :xmlpath, :string
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
root "paths"
|
|
11
|
+
|
|
12
|
+
map_attribute "xmlpath", to: :xmlpath
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|