xmi 0.5.2 → 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.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +5 -1
  3. data/.rubocop_todo.yml +52 -9
  4. data/lib/xmi/extension.rb +4 -12
  5. data/lib/xmi/parser_pipeline.rb +70 -0
  6. data/lib/xmi/root.rb +3 -12
  7. data/lib/xmi/sparx/connector/appearance.rb +27 -0
  8. data/lib/xmi/sparx/connector/connector.rb +52 -0
  9. data/lib/xmi/sparx/connector/end_base.rb +56 -0
  10. data/lib/xmi/sparx/connector/end_constraint.rb +33 -0
  11. data/lib/xmi/sparx/connector/end_modifiers.rb +19 -0
  12. data/lib/xmi/sparx/connector/end_role.rb +21 -0
  13. data/lib/xmi/sparx/connector/end_style.rb +17 -0
  14. data/lib/xmi/sparx/connector/end_type.rb +21 -0
  15. data/lib/xmi/sparx/connector/labels.rb +27 -0
  16. data/lib/xmi/sparx/connector/model.rb +19 -0
  17. data/lib/xmi/sparx/connector/properties.rb +19 -0
  18. data/lib/xmi/sparx/connector.rb +15 -233
  19. data/lib/xmi/sparx/element/association.rb +58 -0
  20. data/lib/xmi/sparx/element/attribute.rb +58 -0
  21. data/lib/xmi/sparx/element/bounds.rb +19 -0
  22. data/lib/xmi/sparx/element/code.rb +19 -0
  23. data/lib/xmi/sparx/element/containment.rb +19 -0
  24. data/lib/xmi/sparx/element/coords.rb +19 -0
  25. data/lib/xmi/sparx/element/documentation.rb +17 -0
  26. data/lib/xmi/sparx/element/element.rb +62 -0
  27. data/lib/xmi/sparx/element/extended_properties.rb +21 -0
  28. data/lib/xmi/sparx/element/flags.rb +29 -0
  29. data/lib/xmi/sparx/element/links.rb +22 -0
  30. data/lib/xmi/sparx/element/model.rb +26 -0
  31. data/lib/xmi/sparx/element/package_properties.rb +21 -0
  32. data/lib/xmi/sparx/element/paths.rb +17 -0
  33. data/lib/xmi/sparx/element/project.rb +29 -0
  34. data/lib/xmi/sparx/element/properties.rb +41 -0
  35. data/lib/xmi/sparx/element/stereotype.rb +17 -0
  36. data/lib/xmi/sparx/element/style.rb +17 -0
  37. data/lib/xmi/sparx/element/styleex.rb +17 -0
  38. data/lib/xmi/sparx/element/tag.rb +32 -0
  39. data/lib/xmi/sparx/element/times.rb +23 -0
  40. data/lib/xmi/sparx/element/xrefs.rb +17 -0
  41. data/lib/xmi/sparx/element.rb +28 -445
  42. data/lib/xmi/sparx/extension.rb +4 -12
  43. data/lib/xmi/sparx/gml/application_schema.rb +26 -0
  44. data/lib/xmi/sparx/gml/code_list.rb +23 -0
  45. data/lib/xmi/sparx/gml/data_type.rb +18 -0
  46. data/lib/xmi/sparx/gml/enumeration.rb +18 -0
  47. data/lib/xmi/sparx/gml/feature_type.rb +21 -0
  48. data/lib/xmi/sparx/gml/property.rb +24 -0
  49. data/lib/xmi/sparx/gml/shared_attributes.rb +39 -0
  50. data/lib/xmi/sparx/gml/type.rb +18 -0
  51. data/lib/xmi/sparx/gml/union.rb +18 -0
  52. data/lib/xmi/sparx/gml.rb +10 -125
  53. data/lib/xmi/sparx/index.rb +248 -0
  54. data/lib/xmi/sparx/mappings/base_mapping.rb +13 -137
  55. data/lib/xmi/sparx/root.rb +20 -7
  56. data/lib/xmi/sparx.rb +1 -0
  57. data/lib/xmi/uml/annotated_element.rb +16 -0
  58. data/lib/xmi/uml/association_generalization.rb +20 -0
  59. data/lib/xmi/uml/bounds.rb +43 -0
  60. data/lib/xmi/uml/default_value.rb +42 -0
  61. data/lib/xmi/uml/diagram.rb +25 -0
  62. data/lib/xmi/uml/member_end.rb +16 -0
  63. data/lib/xmi/uml/owned_attribute.rb +31 -0
  64. data/lib/xmi/uml/owned_comment.rb +29 -0
  65. data/lib/xmi/uml/owned_element.rb +33 -0
  66. data/lib/xmi/uml/owned_end.rb +34 -0
  67. data/lib/xmi/uml/owned_literal.rb +23 -0
  68. data/lib/xmi/uml/owned_operation.rb +22 -0
  69. data/lib/xmi/uml/owned_parameter.rb +29 -0
  70. data/lib/xmi/uml/package_import.rb +30 -0
  71. data/lib/xmi/uml/packaged_element.rb +49 -0
  72. data/lib/xmi/uml/precondition.rb +22 -0
  73. data/lib/xmi/uml/profile.rb +43 -0
  74. data/lib/xmi/uml/profile_application.rb +34 -0
  75. data/lib/xmi/uml/specification.rb +20 -0
  76. data/lib/xmi/uml/type.rb +18 -0
  77. data/lib/xmi/uml/uml_model.rb +29 -0
  78. data/lib/xmi/uml.rb +27 -502
  79. data/lib/xmi/version.rb +1 -1
  80. data/lib/xmi/version_registry.rb +2 -1
  81. data/lib/xmi/xmi_identity.rb +46 -0
  82. data/lib/xmi.rb +11 -6
  83. metadata +68 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ac4f03d86ac8abffeaecaf956bcd77ab9a3bb2ed6348a12f3ccb2bd587f2eec
4
- data.tar.gz: 7f0051b7bbb867c4c7d82ad95fb435a4f5e5d9bb2b76e1297ded8953682489c1
3
+ metadata.gz: 2ffa11bdf4fbb9c95493ef25cb5662107d72e1e708d526b7a6240ed3ffcd4f99
4
+ data.tar.gz: ba939950443a99f5e4c402ec004f4446c9b520486faa0e90aeeaa4bfb4bc679b
5
5
  SHA512:
6
- metadata.gz: 99a98d34c015c29e2170695e0e3918a98ec9a4308097a32886bd0af401808172b367c2e2da020713dc0ff2db5581c9336b4a4a64e3d3b39b225f4df5cde0296d
7
- data.tar.gz: 060447e7ae2275a40e4881616dc104032c491ae4cc3bb0707bcfbcafb7bf93a068ff6cda7da3cbeb62c37c3ef5d8e34f66a1dfd1a11206b509e99d3af27a7d8e
6
+ metadata.gz: a23e73e4194971d9e3f8b83e3b746195ad227dd812e3777c5e3d33b59498e85448a4dd4ef3177f5e297693e7efb9a8e6a7de0ed59d9c0d6e33a1fea7b58a7290
7
+ data.tar.gz: 3ec9666b1313e1f5d0cb426739c7add6fea48253e8d51bf72e04323e2a7213b07877af7867e267f73c70d5c6b44e8b898375d11d137a9ac01868feb2c7cd2a22
@@ -9,6 +9,10 @@ on:
9
9
 
10
10
  jobs:
11
11
  rake:
12
- uses: metanorma/ci/.github/workflows/graphviz-rake.yml@main
12
+ uses: metanorma/ci/.github/workflows/generic-rake.yml@main
13
+ with:
14
+ setup-tools: graphviz
15
+ submodules: true
16
+ choco-cache: true
13
17
  secrets:
14
18
  pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-04-14 03:59:00 UTC using RuboCop version 1.86.1.
3
+ # on 2026-04-20 09:41:00 UTC using RuboCop version 1.86.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -11,21 +11,55 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'xmi.gemspec'
13
13
 
14
- # Offense count: 72
14
+ # Offense count: 2
15
+ # This cop supports safe autocorrection (--autocorrect).
16
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
17
+ # SupportedStyles: with_first_argument, with_fixed_indentation
18
+ Layout/ArgumentAlignment:
19
+ Exclude:
20
+ - 'lib/xmi/parser_pipeline.rb'
21
+ - 'lib/xmi/sparx/index.rb'
22
+
23
+ # Offense count: 1
24
+ # This cop supports safe autocorrection (--autocorrect).
25
+ Layout/EmptyLinesAfterModuleInclusion:
26
+ Exclude:
27
+ - 'lib/xmi/sparx/gml/shared_attributes.rb'
28
+
29
+ # Offense count: 1
30
+ # This cop supports safe autocorrection (--autocorrect).
31
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
32
+ # SupportedHashRocketStyles: key, separator, table
33
+ # SupportedColonStyles: key, separator, table
34
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
35
+ Layout/HashAlignment:
36
+ Exclude:
37
+ - 'lib/xmi/sparx/mappings/base_mapping.rb'
38
+
39
+ # Offense count: 76
15
40
  # This cop supports safe autocorrection (--autocorrect).
16
41
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
17
42
  # URISchemes: http, https
18
43
  Layout/LineLength:
19
44
  Enabled: false
20
45
 
21
- # Offense count: 5
46
+ # Offense count: 2
47
+ # This cop supports safe autocorrection (--autocorrect).
48
+ # Configuration parameters: AllowInHeredoc.
49
+ Layout/TrailingWhitespace:
50
+ Exclude:
51
+ - 'lib/xmi/parser_pipeline.rb'
52
+ - 'lib/xmi/sparx/index.rb'
53
+
54
+ # Offense count: 6
22
55
  # Configuration parameters: AllowedMethods.
23
56
  # AllowedMethods: enums
24
57
  Lint/ConstantDefinitionInBlock:
25
58
  Exclude:
59
+ - 'lib/xmi/sparx/mappings/base_mapping.rb'
26
60
  - 'spec/performance/xmi_parsing_spec.rb'
27
61
 
28
- # Offense count: 12
62
+ # Offense count: 15
29
63
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
30
64
  Metrics/AbcSize:
31
65
  Exclude:
@@ -33,31 +67,34 @@ Metrics/AbcSize:
33
67
  - 'lib/tasks/performance_comparator.rb'
34
68
  - 'lib/tasks/performance_helpers.rb'
35
69
  - 'lib/xmi/ea_root.rb'
70
+ - 'lib/xmi/sparx/index.rb'
36
71
  - 'lib/xmi/version_registry.rb'
37
72
  - 'spec/performance/xmi_parsing_spec.rb'
38
73
 
39
- # Offense count: 95
74
+ # Offense count: 96
40
75
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
41
76
  # AllowedMethods: refine
42
77
  Metrics/BlockLength:
43
- Max: 143
78
+ Max: 98
44
79
 
45
- # Offense count: 1
80
+ # Offense count: 4
46
81
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
47
82
  Metrics/CyclomaticComplexity:
48
83
  Exclude:
49
84
  - 'lib/tasks/performance_helpers.rb'
85
+ - 'lib/xmi/sparx/index.rb'
50
86
 
51
- # Offense count: 26
87
+ # Offense count: 29
52
88
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
53
89
  Metrics/MethodLength:
54
90
  Max: 33
55
91
 
56
- # Offense count: 2
92
+ # Offense count: 4
57
93
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
58
94
  Metrics/PerceivedComplexity:
59
95
  Exclude:
60
96
  - 'lib/tasks/performance_helpers.rb'
97
+ - 'lib/xmi/sparx/index.rb'
61
98
  - 'lib/xmi/version_registry.rb'
62
99
 
63
100
  # Offense count: 19
@@ -122,6 +159,12 @@ RSpec/MultipleMemoizedHelpers:
122
159
  RSpec/NestedGroups:
123
160
  Max: 4
124
161
 
162
+ # Offense count: 1
163
+ # This cop supports safe autocorrection (--autocorrect).
164
+ Style/MultilineIfModifier:
165
+ Exclude:
166
+ - 'lib/xmi/sparx/index.rb'
167
+
125
168
  # Offense count: 4
126
169
  # Configuration parameters: AllowedClasses.
127
170
  Style/OneClassPerFile:
data/lib/xmi/extension.rb CHANGED
@@ -2,12 +2,8 @@
2
2
 
3
3
  module Xmi
4
4
  class Extension < Lutaml::Model::Serializable
5
- attribute :id, ::Xmi::Type::XmiId
6
- attribute :label, ::Xmi::Type::XmiLabel
7
- attribute :uuid, ::Xmi::Type::XmiUuid
8
- attribute :href, :string
9
- attribute :idref, ::Xmi::Type::XmiIdRef
10
- attribute :type, ::Xmi::Type::XmiType
5
+ include XmiIdentity::Attributes
6
+
11
7
  attribute :extender, :string
12
8
  attribute :extender_id, :string
13
9
 
@@ -15,12 +11,8 @@ module Xmi
15
11
  root "Extension"
16
12
  namespace ::Xmi::Namespace::Omg::Xmi
17
13
 
18
- map_attribute "id", to: :id
19
- map_attribute "label", to: :label
20
- map_attribute "uuid", to: :uuid
21
- map_attribute "href", to: :href
22
- map_attribute "idref", to: :idref
23
- map_attribute "type", to: :type
14
+ XmiIdentity.apply_xml_mappings(self)
15
+
24
16
  map_attribute "extender", to: :extender
25
17
  map_attribute "extenderID", to: :extender_id
26
18
  end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ # Composable pipeline for XMI parsing.
5
+ #
6
+ # Each step receives a context hash and returns an updated context hash.
7
+ # New concerns (validation, logging, caching) are added by inserting steps
8
+ # without modifying existing code — Open/Closed Principle.
9
+ #
10
+ # @example
11
+ # context = { xml: xml_content, root_class: Xmi::Sparx::SparxRoot }
12
+ # result = Xmi::ParserPipeline.run(context)
13
+ # result[:root] # => parsed SparxRoot instance
14
+ #
15
+ module ParserPipeline
16
+ module Steps
17
+ module FixEncoding
18
+ def self.call(ctx)
19
+ xml = ctx[:xml]
20
+ if xml.respond_to?(:valid_encoding?) && !xml.valid_encoding?
21
+ xml = xml
22
+ .encode("UTF-16be", invalid: :replace, replace: "?")
23
+ .encode("UTF-8")
24
+ end
25
+ ctx.merge(xml: xml)
26
+ end
27
+ end
28
+
29
+ module InitVersioning
30
+ def self.call(ctx)
31
+ Xmi.init_versioning!
32
+ ctx
33
+ end
34
+ end
35
+
36
+ module ParseXml
37
+ def self.call(ctx)
38
+ root_class = ctx[:root_class]
39
+ root = VersionRegistry.parse_with_detected_version(ctx[:xml],
40
+ root_class)
41
+ ctx.merge(root: root)
42
+ end
43
+ end
44
+
45
+ module BuildIndex
46
+ def self.call(ctx)
47
+ root = ctx[:root]
48
+ root.build_index if root.respond_to?(:build_index)
49
+ ctx
50
+ end
51
+ end
52
+ end
53
+
54
+ DEFAULT_STEPS = [
55
+ Steps::FixEncoding,
56
+ Steps::InitVersioning,
57
+ Steps::ParseXml,
58
+ Steps::BuildIndex,
59
+ ].freeze
60
+
61
+ # Run the pipeline with default or custom steps.
62
+ #
63
+ # @param ctx [Hash] Initial context with :xml and :root_class
64
+ # @param steps [Array<Module>] Pipeline steps (defaults to DEFAULT_STEPS)
65
+ # @return [Hash] Final context including :root
66
+ def self.run(ctx, steps: DEFAULT_STEPS)
67
+ steps.reduce(ctx) { |context, step| step.call(context) }
68
+ end
69
+ end
70
+ end
data/lib/xmi/root.rb CHANGED
@@ -5,12 +5,8 @@ require_relative "uml"
5
5
 
6
6
  module Xmi
7
7
  class Root < Lutaml::Model::Serializable
8
- attribute :id, ::Xmi::Type::XmiId
9
- attribute :label, ::Xmi::Type::XmiLabel
10
- attribute :uuid, ::Xmi::Type::XmiUuid
11
- attribute :href, :string
12
- attribute :idref, ::Xmi::Type::XmiIdRef
13
- attribute :type, ::Xmi::Type::XmiType
8
+ include XmiIdentity::Attributes
9
+
14
10
  attribute :documentation, Documentation
15
11
  attribute :bibliography, CustomProfile::Bibliography, collection: true
16
12
  attribute :basic_doc, CustomProfile::BasicDoc, collection: true
@@ -44,12 +40,7 @@ module Xmi
44
40
  ::Xmi::Namespace::Sparx::CityGml,
45
41
  ]
46
42
 
47
- map_attribute "id", to: :id
48
- map_attribute "label", to: :label
49
- map_attribute "uuid", to: :uuid
50
- map_attribute "href", to: :href
51
- map_attribute "idref", to: :idref
52
- map_attribute "type", to: :type
43
+ XmiIdentity.apply_xml_mappings(self)
53
44
 
54
45
  map_element "Documentation", to: :documentation
55
46
  map_element "Model", to: :model
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class Appearance < Lutaml::Model::Serializable
7
+ attribute :linemode, :integer
8
+ attribute :linecolor, :integer
9
+ attribute :linewidth, :integer
10
+ attribute :seqno, :integer
11
+ attribute :headStyle, :integer
12
+ attribute :lineStyle, :integer
13
+
14
+ xml do
15
+ root "appearance"
16
+
17
+ map_attribute :linemode, to: :linemode
18
+ map_attribute :linecolor, to: :linecolor
19
+ map_attribute :linewidth, to: :linewidth
20
+ map_attribute :seqno, to: :seqno
21
+ map_attribute :headStyle, to: :headStyle
22
+ map_attribute :lineStyle, to: :lineStyle
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class Connector < Lutaml::Model::Serializable
7
+ attribute :name, :string
8
+ attribute :idref, ::Xmi::Type::XmiIdRef
9
+ attribute :source, Source
10
+ attribute :target, Target
11
+ attribute :model, Model
12
+ attribute :properties, Properties
13
+ attribute :documentation, Element::Documentation
14
+ attribute :appearance, Appearance
15
+ attribute :labels, Labels
16
+ attribute :extended_properties, Element::ExtendedProperties
17
+ attribute :style, Element::Style
18
+ attribute :tags, Element::Tags
19
+ attribute :xrefs, Element::Xrefs
20
+
21
+ xml do
22
+ root "element"
23
+
24
+ map_attribute "name", to: :name
25
+ map_attribute "idref", to: :idref
26
+
27
+ map_element "source", to: :source
28
+ map_element "target", to: :target
29
+ map_element "model", to: :model
30
+ map_element "properties", to: :properties
31
+ map_element "documentation", to: :documentation, value_map: VALUE_MAP
32
+ map_element "appearance", to: :appearance
33
+ map_element "labels", to: :labels, render_nil: true
34
+ map_element "extendedProperties", to: :extended_properties
35
+ map_element "style", to: :style, render_nil: true
36
+ map_element "xrefs", to: :xrefs, render_nil: true
37
+ map_element "tags", to: :tags, render_nil: true
38
+ end
39
+ end
40
+
41
+ class Connectors < Lutaml::Model::Serializable
42
+ attribute :connector, Connector, collection: true
43
+
44
+ xml do
45
+ root "connectors"
46
+
47
+ map_element "connector", to: :connector, value_map: VALUE_MAP
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class End < Lutaml::Model::Serializable
7
+ attribute :idref, ::Xmi::Type::XmiIdRef
8
+ attribute :model, Model
9
+ attribute :role, EndRole
10
+ attribute :type, EndType
11
+ attribute :constraints, EndConstraints
12
+ attribute :modifiers, EndModifiers
13
+ attribute :style, EndStyle
14
+ attribute :documentation, Element::Documentation
15
+ attribute :xrefs, Element::Xrefs
16
+ attribute :tags, Element::Tags
17
+ end
18
+
19
+ class Source < End
20
+ xml do
21
+ root "source"
22
+
23
+ map_attribute "idref", to: :idref
24
+
25
+ map_element "model", to: :model, render_nil: true
26
+ map_element "role", to: :role, render_nil: true
27
+ map_element "type", to: :type, render_nil: true
28
+ map_element "constraints", to: :constraints, render_nil: true
29
+ map_element "modifiers", to: :modifiers, render_nil: true
30
+ map_element "style", to: :style, render_nil: true
31
+ map_element "documentation", to: :documentation, value_map: VALUE_MAP
32
+ map_element "xrefs", to: :xrefs, render_nil: true
33
+ map_element "tags", to: :tags, render_nil: true
34
+ end
35
+ end
36
+
37
+ class Target < End
38
+ xml do
39
+ root "target"
40
+
41
+ map_attribute "idref", to: :idref
42
+
43
+ map_element "model", to: :model, render_nil: true
44
+ map_element "role", to: :role, render_nil: true
45
+ map_element "type", to: :type, render_nil: true
46
+ map_element "constraints", to: :constraints, render_nil: true
47
+ map_element "modifiers", to: :modifiers, render_nil: true
48
+ map_element "style", to: :style, render_nil: true
49
+ map_element "documentation", to: :documentation, value_map: VALUE_MAP
50
+ map_element "xrefs", to: :xrefs, render_nil: true
51
+ map_element "tags", to: :tags, render_nil: true
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class EndConstraint < Lutaml::Model::Serializable
7
+ attribute :name, :string
8
+ attribute :type, ::Xmi::Type::XmiType
9
+ attribute :weight, :float
10
+ attribute :status, :string
11
+
12
+ xml do
13
+ root "constraint"
14
+
15
+ map_attribute "name", to: :name
16
+ map_attribute "type", to: :type
17
+ map_attribute "weight", to: :weight
18
+ map_attribute "status", to: :status
19
+ end
20
+ end
21
+
22
+ class EndConstraints < Lutaml::Model::Serializable
23
+ attribute :constraint, EndConstraint, collection: true
24
+
25
+ xml do
26
+ root "constraints"
27
+
28
+ map_element "constraint", to: :constraint, value_map: VALUE_MAP
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class EndModifiers < Lutaml::Model::Serializable
7
+ attribute :is_ordered, :boolean
8
+ attribute :is_navigable, :boolean
9
+
10
+ xml do
11
+ root "type"
12
+
13
+ map_attribute "isOrdered", to: :is_ordered
14
+ map_attribute "isNavigable", to: :is_navigable
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class EndRole < Lutaml::Model::Serializable
7
+ attribute :name, :string
8
+ attribute :visibility, :string
9
+ attribute :target_scope, :string
10
+
11
+ xml do
12
+ root "role"
13
+
14
+ map_attribute :name, to: :name
15
+ map_attribute :visibility, to: :visibility
16
+ map_attribute :targetScope, to: :target_scope
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 Connector
6
+ class EndStyle < Lutaml::Model::Serializable
7
+ attribute :value, :string
8
+
9
+ xml do
10
+ root "style"
11
+
12
+ map_attribute "value", to: :value
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class EndType < Lutaml::Model::Serializable
7
+ attribute :aggregation, :string
8
+ attribute :multiplicity, :string
9
+ attribute :containment, :string
10
+
11
+ xml do
12
+ root "type"
13
+
14
+ map_attribute :aggregation, to: :aggregation
15
+ map_attribute :multiplicity, to: :multiplicity
16
+ map_attribute :containment, to: :containment
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class Labels < Lutaml::Model::Serializable
7
+ attribute :rb, :string
8
+ attribute :lb, :string
9
+ attribute :mb, :string
10
+ attribute :rt, :string
11
+ attribute :lt, :string
12
+ attribute :mt, :string
13
+
14
+ xml do
15
+ root "labels"
16
+
17
+ map_attribute :rb, to: :rb
18
+ map_attribute :lb, to: :lb
19
+ map_attribute :mb, to: :mb
20
+ map_attribute :rt, to: :rt
21
+ map_attribute :lt, to: :lt
22
+ map_attribute :mt, to: :mt
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xmi
4
+ module Sparx
5
+ module Connector
6
+ class Model < Lutaml::Model::Serializable
7
+ attribute :ea_localid, :string
8
+ attribute :type, ::Xmi::Type::XmiType
9
+ attribute :name, :string
10
+
11
+ xml do
12
+ map_attribute "ea_localid", to: :ea_localid
13
+ map_attribute "type", to: :type
14
+ map_attribute "name", to: :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 Connector
6
+ class Properties < Lutaml::Model::Serializable
7
+ attribute :ea_type, :string
8
+ attribute :direction, :string
9
+
10
+ xml do
11
+ root "properties"
12
+
13
+ map_attribute :ea_type, to: :ea_type
14
+ map_attribute :direction, to: :direction
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end