xmi 0.5.10 → 0.5.12

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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +102 -6
  3. data/Gemfile +0 -1
  4. data/TODO.next/01-packaged-element-typed-subclasses.md +94 -0
  5. data/TODO.next/03-real-sparx-instancespec-fixture.md +56 -0
  6. data/TODO.next/README.md +17 -0
  7. data/lib/xmi/namespace/omg.rb +6 -0
  8. data/lib/xmi/root.rb +2 -2
  9. data/lib/xmi/sparx/connector/appearance.rb +1 -0
  10. data/lib/xmi/sparx/connector/connector.rb +2 -0
  11. data/lib/xmi/sparx/connector/end_base.rb +2 -0
  12. data/lib/xmi/sparx/connector/end_constraint.rb +2 -0
  13. data/lib/xmi/sparx/connector/end_modifiers.rb +1 -0
  14. data/lib/xmi/sparx/connector/end_role.rb +1 -0
  15. data/lib/xmi/sparx/connector/end_style.rb +1 -0
  16. data/lib/xmi/sparx/connector/end_type.rb +1 -0
  17. data/lib/xmi/sparx/connector/labels.rb +1 -0
  18. data/lib/xmi/sparx/connector/properties.rb +1 -0
  19. data/lib/xmi/sparx/diagram.rb +5 -0
  20. data/lib/xmi/sparx/element/association.rb +4 -0
  21. data/lib/xmi/sparx/element/attribute.rb +2 -0
  22. data/lib/xmi/sparx/element/bounds.rb +1 -0
  23. data/lib/xmi/sparx/element/code.rb +1 -0
  24. data/lib/xmi/sparx/element/containment.rb +1 -0
  25. data/lib/xmi/sparx/element/coords.rb +1 -0
  26. data/lib/xmi/sparx/element/documentation.rb +1 -0
  27. data/lib/xmi/sparx/element/element.rb +2 -0
  28. data/lib/xmi/sparx/element/extended_properties.rb +1 -0
  29. data/lib/xmi/sparx/element/flags.rb +1 -0
  30. data/lib/xmi/sparx/element/links.rb +1 -0
  31. data/lib/xmi/sparx/element/model.rb +1 -1
  32. data/lib/xmi/sparx/element/package_properties.rb +1 -0
  33. data/lib/xmi/sparx/element/paths.rb +1 -0
  34. data/lib/xmi/sparx/element/project.rb +1 -0
  35. data/lib/xmi/sparx/element/properties.rb +1 -0
  36. data/lib/xmi/sparx/element/stereotype.rb +1 -0
  37. data/lib/xmi/sparx/element/style.rb +1 -0
  38. data/lib/xmi/sparx/element/styleex.rb +1 -0
  39. data/lib/xmi/sparx/element/tag.rb +2 -0
  40. data/lib/xmi/sparx/element/times.rb +1 -0
  41. data/lib/xmi/sparx/element/xrefs.rb +1 -0
  42. data/lib/xmi/sparx/mappings/base_mapping.rb +1 -1
  43. data/lib/xmi/sparx/primitive_type.rb +1 -0
  44. data/lib/xmi/uml/association.rb +12 -0
  45. data/lib/xmi/uml/association_class.rb +17 -0
  46. data/lib/xmi/uml/association_generalization.rb +1 -8
  47. data/lib/xmi/uml/base.rb +32 -0
  48. data/lib/xmi/uml/bounds.rb +1 -18
  49. data/lib/xmi/uml/data_type.rb +12 -0
  50. data/lib/xmi/uml/default_value.rb +7 -34
  51. data/lib/xmi/uml/dependency.rb +17 -0
  52. data/lib/xmi/uml/enumeration.rb +12 -0
  53. data/lib/xmi/uml/extension.rb +18 -0
  54. data/lib/xmi/uml/imported_package.rb +17 -0
  55. data/lib/xmi/uml/instance_specification.rb +13 -0
  56. data/lib/xmi/uml/interface.rb +12 -0
  57. data/lib/xmi/uml/interface_realization.rb +26 -0
  58. data/lib/xmi/uml/literal_boolean.rb +15 -0
  59. data/lib/xmi/uml/literal_integer.rb +15 -0
  60. data/lib/xmi/uml/literal_null.rb +14 -0
  61. data/lib/xmi/uml/literal_string.rb +15 -0
  62. data/lib/xmi/uml/literal_unlimited_natural.rb +16 -0
  63. data/lib/xmi/uml/lower_value.rb +13 -0
  64. data/lib/xmi/uml/opaque_expression.rb +31 -0
  65. data/lib/xmi/uml/owned_attribute.rb +28 -13
  66. data/lib/xmi/uml/owned_comment.rb +1 -8
  67. data/lib/xmi/uml/owned_element.rb +1 -1
  68. data/lib/xmi/uml/owned_end.rb +15 -14
  69. data/lib/xmi/uml/owned_literal.rb +1 -9
  70. data/lib/xmi/uml/owned_operation.rb +11 -4
  71. data/lib/xmi/uml/owned_parameter.rb +18 -12
  72. data/lib/xmi/uml/package.rb +12 -0
  73. data/lib/xmi/uml/package_import.rb +2 -12
  74. data/lib/xmi/uml/packaged_element.rb +50 -10
  75. data/lib/xmi/uml/precondition.rb +1 -8
  76. data/lib/xmi/uml/primitive_type.rb +12 -0
  77. data/lib/xmi/uml/profile.rb +2 -17
  78. data/lib/xmi/uml/profile_application.rb +2 -14
  79. data/lib/xmi/uml/profile_application_applied_profile.rb +21 -0
  80. data/lib/xmi/uml/profile_attributes.rb +20 -0
  81. data/lib/xmi/uml/realization.rb +14 -0
  82. data/lib/xmi/uml/signal.rb +18 -0
  83. data/lib/xmi/uml/slot.rb +18 -0
  84. data/lib/xmi/uml/specification.rb +3 -8
  85. data/lib/xmi/uml/stereotype.rb +18 -0
  86. data/lib/xmi/uml/uml_class.rb +17 -0
  87. data/lib/xmi/uml/uml_model.rb +7 -11
  88. data/lib/xmi/uml/upper_value.rb +13 -0
  89. data/lib/xmi/uml/usage.rb +18 -0
  90. data/lib/xmi/uml/value_specification.rb +46 -0
  91. data/lib/xmi/uml/waypoint.rb +23 -0
  92. data/lib/xmi/uml.rb +32 -6
  93. data/lib/xmi/version.rb +1 -1
  94. data/lib/xmi.rb +17 -3
  95. data/xmi.gemspec +1 -1
  96. metadata +38 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 976e5ead605c997e4d73a93c6948f2485a1d206b0cfda550a9a19bb07ddfcc8f
4
- data.tar.gz: 96c401beee71fb54e99028d1ac97f66b317b0ebd35e82b551099ce9fcb940eb2
3
+ metadata.gz: 4268a73b32cabe65fa9a63dc4e87588941df98e4480697e704e19d33be0d4d2f
4
+ data.tar.gz: b92789685eee2191f08b81537f1a4c6740ae5bdba96a48060992174ee7a2b58a
5
5
  SHA512:
6
- metadata.gz: ab01fd9cadfac3ee3dde31f738fc39e5d5909914a6cdd2f0a6a74e137c79a9add58573d101a89d8947f57d45dacd62d494607f8f9c8391f43c7b4a9135d51905
7
- data.tar.gz: 2ba592f2b7dccb3fdb96b48358bdf7d4d9a9fa8339f474cb00efc546c7cff9a99cdebe49617c2287a340f39e5e54f69a692946a3f877948cd692d474d16a2c1e
6
+ metadata.gz: abcee32a264c8519d7e7a5110cc89e6327e20dce2ded8999266aa928c67e59daf0f993f3b8577d6c628137345b10367e9fbb23b8d832c1d49bafbbeda83ec43d
7
+ data.tar.gz: 2d46d5677820d183a9d33418ead0ff9cf4ffe8d887aa16e629c27d782e282baa4a94ca08d8bc1cb531728e781d4613e09f371e7454b3fc94bb306271807ddadf
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-05-20 14:51:37 UTC using RuboCop version 1.86.1.
3
+ # on 2026-07-02 17:45:26 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,13 +11,96 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'xmi.gemspec'
13
13
 
14
- # Offense count: 79
14
+ # Offense count: 11
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/uml.rb'
21
+ - 'spec/xmi/uml/autoload_spec.rb'
22
+ - 'spec/xmi/uml/literal_classes_spec.rb'
23
+ - 'spec/xmi/uml/owned_end_spec.rb'
24
+
25
+ # Offense count: 3
26
+ # This cop supports safe autocorrection (--autocorrect).
27
+ # Configuration parameters: EnforcedStyleAlignWith.
28
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
29
+ Layout/BlockAlignment:
30
+ Exclude:
31
+ - 'spec/xmi/uml/instance_specification_spec.rb'
32
+ - 'spec/xmi/uml/slot_spec.rb'
33
+
34
+ # Offense count: 3
35
+ # This cop supports safe autocorrection (--autocorrect).
36
+ Layout/BlockEndNewline:
37
+ Exclude:
38
+ - 'spec/xmi/uml/instance_specification_spec.rb'
39
+ - 'spec/xmi/uml/slot_spec.rb'
40
+
41
+ # Offense count: 1
42
+ # This cop supports safe autocorrection (--autocorrect).
43
+ Layout/ClosingParenthesisIndentation:
44
+ Exclude:
45
+ - 'spec/xmi/uml/slot_spec.rb'
46
+
47
+ # Offense count: 1
48
+ # This cop supports safe autocorrection (--autocorrect).
49
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
50
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
51
+ Layout/FirstArgumentIndentation:
52
+ Exclude:
53
+ - 'spec/xmi/uml/slot_spec.rb'
54
+
55
+ # Offense count: 12
56
+ # This cop supports safe autocorrection (--autocorrect).
57
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
58
+ # SupportedHashRocketStyles: key, separator, table
59
+ # SupportedColonStyles: key, separator, table
60
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
61
+ Layout/HashAlignment:
62
+ Exclude:
63
+ - 'lib/xmi.rb'
64
+ - 'lib/xmi/uml/packaged_element.rb'
65
+ - 'lib/xmi/uml/uml_model.rb'
66
+ - 'spec/xmi/uml/literal_classes_spec.rb'
67
+
68
+ # Offense count: 6
69
+ # This cop supports safe autocorrection (--autocorrect).
70
+ # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
71
+ # SupportedStylesAlignWith: start_of_line, relative_to_receiver
72
+ Layout/IndentationWidth:
73
+ Exclude:
74
+ - 'spec/xmi/uml/instance_specification_spec.rb'
75
+ - 'spec/xmi/uml/slot_spec.rb'
76
+
77
+ # Offense count: 131
15
78
  # This cop supports safe autocorrection (--autocorrect).
16
79
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
17
80
  # URISchemes: http, https
18
81
  Layout/LineLength:
19
82
  Enabled: false
20
83
 
84
+ # Offense count: 1
85
+ # This cop supports safe autocorrection (--autocorrect).
86
+ # Configuration parameters: EnforcedStyle.
87
+ # SupportedStyles: symmetrical, new_line, same_line
88
+ Layout/MultilineMethodCallBraceLayout:
89
+ Exclude:
90
+ - 'spec/xmi/uml/slot_spec.rb'
91
+
92
+ # Offense count: 10
93
+ # This cop supports safe autocorrection (--autocorrect).
94
+ # Configuration parameters: AllowInHeredoc.
95
+ Layout/TrailingWhitespace:
96
+ Exclude:
97
+ - 'lib/xmi/uml.rb'
98
+ - 'lib/xmi/uml/packaged_element.rb'
99
+ - 'lib/xmi/uml/uml_model.rb'
100
+ - 'spec/xmi/uml/autoload_spec.rb'
101
+ - 'spec/xmi/uml/literal_classes_spec.rb'
102
+ - 'spec/xmi/uml/owned_end_spec.rb'
103
+
21
104
  # Offense count: 6
22
105
  # Configuration parameters: AllowedMethods.
23
106
  # AllowedMethods: enums
@@ -52,7 +135,7 @@ Metrics/CyclomaticComplexity:
52
135
  - 'lib/xmi/ea_root/code_generation.rb'
53
136
  - 'lib/xmi/sparx/index.rb'
54
137
 
55
- # Offense count: 30
138
+ # Offense count: 29
56
139
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
57
140
  Metrics/MethodLength:
58
141
  Max: 55
@@ -95,16 +178,17 @@ RSpec/ContextWording:
95
178
  - 'spec/xmi/sparx/sparx_root_gml_spec.rb'
96
179
  - 'spec/xmi/sparx/sparx_root_mdg_spec.rb'
97
180
 
98
- # Offense count: 4
181
+ # Offense count: 5
99
182
  # Configuration parameters: IgnoredMetadata.
100
183
  RSpec/DescribeClass:
101
184
  Exclude:
102
185
  - 'spec/performance/xmi_parsing_spec.rb'
103
186
  - 'spec/xmi/edge_cases_spec.rb'
104
187
  - 'spec/xmi/namespace_aliases_spec.rb'
188
+ - 'spec/xmi/sparx/mixed_prefix_style_spec.rb'
105
189
  - 'spec/xmi/versioning_spec.rb'
106
190
 
107
- # Offense count: 37
191
+ # Offense count: 52
108
192
  # Configuration parameters: CountAsOne.
109
193
  RSpec/ExampleLength:
110
194
  Max: 33
@@ -119,7 +203,7 @@ RSpec/MultipleDescribes:
119
203
  Exclude:
120
204
  - 'spec/xmi/sparx/gml/shared_attributes_spec.rb'
121
205
 
122
- # Offense count: 57
206
+ # Offense count: 120
123
207
  RSpec/MultipleExpectations:
124
208
  Max: 8
125
209
 
@@ -147,6 +231,18 @@ RSpec/SpecFilePathFormat:
147
231
  - 'spec/xmi/sparx/sparx_root_xmi2013_uml2013_spec.rb'
148
232
  - 'spec/xmi/sparx/sparx_root_xmi_parsing_spec.rb'
149
233
 
234
+ # Offense count: 5
235
+ # This cop supports safe autocorrection (--autocorrect).
236
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
237
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
238
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
239
+ # FunctionalMethods: let, let!, subject, watch
240
+ # AllowedMethods: lambda, proc, it
241
+ Style/BlockDelimiters:
242
+ Exclude:
243
+ - 'spec/xmi/uml/instance_specification_spec.rb'
244
+ - 'spec/xmi/uml/slot_spec.rb'
245
+
150
246
  # Offense count: 4
151
247
  # Configuration parameters: AllowedClasses.
152
248
  Style/OneClassPerFile:
data/Gemfile CHANGED
@@ -8,7 +8,6 @@ gemspec
8
8
  gem "benchmark"
9
9
  gem "benchmark-ips"
10
10
  gem "canon"
11
- gem "lutaml-model", github: "lutaml/lutaml-model", ref: "main"
12
11
  gem "rake"
13
12
  gem "rspec"
14
13
  gem "rubocop"
@@ -0,0 +1,94 @@
1
+ # 01 — PackagedElement typed subclasses (Phase B remaining)
2
+
3
+ **Status: PARTIAL — Phase A landed (2026-07-03); Phase B (narrowing
4
+ attrs to subclasses) deferred.**
5
+
6
+ ## What landed (Phase A)
7
+
8
+ Polymorphic dispatch on `PackagedElement.packaged_element` and
9
+ `UmlModel.packaged_element`. Each `<packagedElement xmi:type="uml:X">`
10
+ now parses to a corresponding `Xmi::Uml::X` subclass:
11
+
12
+ | xmi:type | Ruby class |
13
+ |---|---|
14
+ | uml:Class | `Xmi::Uml::UmlClass` |
15
+ | uml:Association | `Xmi::Uml::Association` |
16
+ | uml:Interface | `Xmi::Uml::Interface` |
17
+ | uml:InstanceSpecification | `Xmi::Uml::InstanceSpecification` |
18
+ | uml:DataType | `Xmi::Uml::DataType` |
19
+ | uml:PrimitiveType | `Xmi::Uml::PrimitiveType` |
20
+ | uml:Enumeration | `Xmi::Uml::Enumeration` |
21
+ | uml:Package | `Xmi::Uml::Package` |
22
+ | uml:Realization | `Xmi::Uml::Realization` |
23
+
24
+ Dispatch map: `Xmi::Uml::PACKAGED_ELEMENT_POLYMORPHIC_MAP` in
25
+ `lib/xmi/uml/packaged_element.rb`. Spec coverage:
26
+ `spec/xmi/uml/packaged_element_dispatch_spec.rb` (17 examples).
27
+
28
+ Subclasses currently inherit the **full union-bag attribute set**
29
+ from `PackagedElement`. Consumers can dispatch on `is_a?(Xmi::Uml::X)`
30
+ for type-specific behavior, but accessing the wrong attr on the wrong
31
+ type still returns nil/empty rather than raising.
32
+
33
+ ## What's deferred (Phase B)
34
+
35
+ Narrow each subclass's attribute set to its UML-2.5-conformant subset.
36
+ Examples:
37
+
38
+ | Class | Valid attrs (today, all inherited) |
39
+ |---|---|
40
+ | UmlClass | owned_attribute, owned_operation, owned_comment, generalization, interface_realization, nested packaged_element |
41
+ | Association | owned_end, member_end, member_ends |
42
+ | InstanceSpecification | classifier, slot, specification |
43
+ | Interface | owned_operation, generalization |
44
+ | Enumeration | owned_literal |
45
+ | DataType | owned_attribute, owned_operation |
46
+ | PrimitiveType | (none) |
47
+ | Realization | supplier, client |
48
+ | Package | nested packaged_element |
49
+
50
+ After Phase B, `instance.owned_attribute` raises NoMethodError on an
51
+ InstanceSpecification — the type system catches the misuse at runtime.
52
+
53
+ ## Why Phase B is deferred
54
+
55
+ - **Breaking change.** Every consumer that accesses attrs via the
56
+ base `PackagedElement` type breaks. The `lutaml/ea` transformer
57
+ walks packaged_element generically; it would need type-specific
58
+ dispatch added.
59
+ - **Test churn.** Every Sparx fixture regression test that accesses
60
+ `pe.owned_attribute` (etc.) on a generic PackagedElement needs
61
+ updating.
62
+ - **Limited semantic gain.** Phase A already gives consumers the
63
+ type tag. Phase B catches programming errors but doesn't enable
64
+ new functionality.
65
+ - The original TODO.next/01 design doc proposed Phase A as
66
+ "risk-free" and Phase B as the "breaking change." That framing
67
+ holds.
68
+
69
+ ## Rollout strategy for Phase B
70
+
71
+ 1. Survey every consumer of `PackagedElement` attrs in `lutaml/ea`,
72
+ `lutaml/lutaml-uml`, and downstream.
73
+ 2. For each consumer, change to type-specific dispatch:
74
+ ```ruby
75
+ case pe
76
+ when Xmi::Uml::UmlClass then pe.owned_attribute ...
77
+ when Xmi::Uml::Association then pe.owned_end ...
78
+ end
79
+ ```
80
+ 3. Once consumers are type-aware, narrow subclass attrs.
81
+ 4. Remove the narrowed attrs from `PackagedElement`.
82
+
83
+ This is a multi-PR change. Each step should land separately so
84
+ bisect works.
85
+
86
+ ## Open questions
87
+
88
+ - Should `Generalization` move from `packagedElement` to its own
89
+ child element shape to match OMG XMI? Sparx uses both. Defer.
90
+ - How to handle EA's `uml:ExtensionEnd` and other Sparx-isms? Treat
91
+ as subclasses of the closest OMG type.
92
+ - The polymorphic dispatch failure mode (unknown xmi:type raises
93
+ TypeError) is locked in by `polymorphic_robustness_spec.rb`. Phase B
94
+ doesn't fix this; it's a separate concern.
@@ -0,0 +1,56 @@
1
+ # 03 — Real Sparx InstanceSpecification fixture (FUTURE)
2
+
3
+ **Status: FUTURE — requires Sparx EA access to acquire the fixture.
4
+ Migrated from `TODO.refactor/16` (2026-07-02).**
5
+
6
+ ## Problem
7
+
8
+ The fixture added in TODO.refactor/08
9
+ (`spec/fixtures/sparx-instance-specification.xmi`) is hand-authored
10
+ to match Sparx EA's mixed-prefix style. It is structurally faithful
11
+ but not byte-identical to real EA output.
12
+
13
+ Several details can drift between synthetic and real:
14
+
15
+ - Whitespace and indentation (tabs vs spaces, blank lines).
16
+ - Attribute ordering within an element.
17
+ - Presence of EA-specific boilerplate (`xmi:Documentation exporter="Enterprise Architect" exporterVersion="..."`).
18
+ - Sparx's `EAID_` GUID format (uppercase hex with underscores, vs.
19
+ the synthetic lowercase).
20
+ - Inclusion of `<xrefs>` elements on slot values (Sparx adds
21
+ cross-references for tracked links).
22
+ - The `<extensions>` element with EA-specific `<elements>` and
23
+ `<connectors>` sections.
24
+
25
+ ## Goal
26
+
27
+ Acquire a real Sparx EA export that contains at least one:
28
+
29
+ - `<packagedElement xmi:type="uml:InstanceSpecification">` with
30
+ `<slot>` children carrying `<value>` of various `xmi:type`.
31
+ - `<interfaceRealization>` (strict OMG form, even though current
32
+ Sparx collapses to `uml:Realization`).
33
+
34
+ Replace `sparx-instance-specification.xmi` with the real fixture,
35
+ or add it as a sibling file. Update parity specs to use the real
36
+ fixture.
37
+
38
+ ## Acquisition
39
+
40
+ Requires Sparx EA access. Suggested steps:
41
+
42
+ 1. In EA, create a small model with one Class, one
43
+ InstanceSpecification, and one InterfaceRealization.
44
+ 2. Publish to XMI (EA's "Publish to File" or "Export to XMI").
45
+ 3. Trim sensitive content if any.
46
+ 4. Commit the fixture with a `<!-- Exported from Sparx EA vX.Y on
47
+ YYYY-MM-DD, trimmed for the lutaml/xmi test suite. -->` header.
48
+
49
+ ## Verification
50
+
51
+ - Real fixture parses without error.
52
+ - All existing parity specs continue to pass (or are updated to
53
+ match real content).
54
+ - Coverage of `<value>` `xmi:type` variants matches what real EA
55
+ emits (OpaqueExpression is the common case; LiteralString for
56
+ default values).
@@ -0,0 +1,17 @@
1
+ # TODO.next — xmi gem follow-ups
2
+
3
+ Open design items after the OwnedEnd schema migration and
4
+ ValueSpecification polymorphic dispatch landed. Each file has a
5
+ Status header:
6
+
7
+ - **DONE** — completed; kept for context
8
+ - **DESIGN-ONLY** — design document, not implemented; awaiting user direction
9
+ - **FUTURE** — needs resources (real Sparx EA access, etc.) to unblock
10
+ - **PARTIAL** — some paths landed, others deferred; see file for breakdown
11
+
12
+ ## Index
13
+
14
+ | # | Title | Status |
15
+ |---|---|---|
16
+ | 01 | [PackagedElement typed subclasses](01-packaged-element-typed-subclasses.md) | PARTIAL (Phase A done, Phase B deferred) |
17
+ | 03 | [Real Sparx InstanceSpecification fixture](03-real-sparx-instancespec-fixture.md) | FUTURE |
@@ -26,6 +26,7 @@ module Xmi
26
26
  class Uml20131001 < Lutaml::Xml::Namespace
27
27
  uri "http://www.omg.org/spec/UML/20131001"
28
28
  prefix_default "uml"
29
+ element_form_default :unqualified
29
30
  end
30
31
 
31
32
  class Uml20161101 < Lutaml::Xml::Namespace
@@ -36,6 +37,7 @@ module Xmi
36
37
  class UmlDi20131001 < Lutaml::Xml::Namespace
37
38
  uri "http://www.omg.org/spec/UML/20131001/UMLDI"
38
39
  prefix_default "umldi"
40
+ element_form_default :unqualified
39
41
  end
40
42
 
41
43
  class UmlDi20161101 < Lutaml::Xml::Namespace
@@ -60,21 +62,25 @@ module Xmi
60
62
  class Xmi < Lutaml::Xml::Namespace
61
63
  uri "http://www.omg.org/spec/XMI/20131001"
62
64
  prefix_default "xmi"
65
+ element_form_default :unqualified
63
66
  end
64
67
 
65
68
  class Uml < Lutaml::Xml::Namespace
66
69
  uri "http://www.omg.org/spec/UML/20131001"
67
70
  prefix_default "uml"
71
+ element_form_default :unqualified
68
72
  end
69
73
 
70
74
  class UmlDi < Lutaml::Xml::Namespace
71
75
  uri "http://www.omg.org/spec/UML/20131001/UMLDI"
72
76
  prefix_default "umldi"
77
+ element_form_default :unqualified
73
78
  end
74
79
 
75
80
  class UmlDc < Lutaml::Xml::Namespace
76
81
  uri "http://www.omg.org/spec/UML/20131001/UMLDC"
77
82
  prefix_default "dc"
83
+ element_form_default :unqualified
78
84
  end
79
85
  end
80
86
  end
data/lib/xmi/root.rb CHANGED
@@ -47,8 +47,8 @@ module Xmi
47
47
 
48
48
  XmiIdentity.apply_xml_mappings(self)
49
49
 
50
- map_element "Documentation", to: :documentation
51
- map_element "Model", to: :model
50
+ map_element "Documentation", to: :documentation, form: :qualified
51
+ map_element "Model", to: :model, form: :qualified
52
52
  map_element "Bibliography", to: :bibliography, value_map: VALUE_MAP
53
53
  map_element "BasicDoc", to: :basic_doc, value_map: VALUE_MAP
54
54
  map_element "enumeration", to: :enumeration, value_map: VALUE_MAP
@@ -14,6 +14,7 @@ module Xmi
14
14
 
15
15
  xml do
16
16
  root "appearance"
17
+ namespace ::Xmi::Namespace::Omg::Xmi
17
18
 
18
19
  map_attribute :linemode, to: :linemode
19
20
  map_attribute :linecolor, to: :linecolor
@@ -21,6 +21,7 @@ module Xmi
21
21
 
22
22
  xml do
23
23
  root "element"
24
+ namespace ::Xmi::Namespace::Omg::Xmi
24
25
 
25
26
  map_attribute "name", to: :name
26
27
  map_attribute "idref", to: :idref
@@ -44,6 +45,7 @@ module Xmi
44
45
 
45
46
  xml do
46
47
  root "connectors"
48
+ namespace ::Xmi::Namespace::Omg::Xmi
47
49
 
48
50
  map_element "connector", to: :connector, value_map: VALUE_MAP
49
51
  end
@@ -21,6 +21,7 @@ module Xmi
21
21
  skip_reference_registration
22
22
  xml do
23
23
  root "source"
24
+ namespace ::Xmi::Namespace::Omg::Xmi
24
25
 
25
26
  map_attribute "idref", to: :idref
26
27
 
@@ -40,6 +41,7 @@ module Xmi
40
41
  skip_reference_registration
41
42
  xml do
42
43
  root "target"
44
+ namespace ::Xmi::Namespace::Omg::Xmi
43
45
 
44
46
  map_attribute "idref", to: :idref
45
47
 
@@ -12,6 +12,7 @@ module Xmi
12
12
 
13
13
  xml do
14
14
  root "constraint"
15
+ namespace ::Xmi::Namespace::Omg::Xmi
15
16
 
16
17
  map_attribute "name", to: :name
17
18
  map_attribute "type", to: :type
@@ -25,6 +26,7 @@ module Xmi
25
26
 
26
27
  xml do
27
28
  root "constraints"
29
+ namespace ::Xmi::Namespace::Omg::Xmi
28
30
 
29
31
  map_element "constraint", to: :constraint, value_map: VALUE_MAP
30
32
  end
@@ -10,6 +10,7 @@ module Xmi
10
10
 
11
11
  xml do
12
12
  root "type"
13
+ namespace ::Xmi::Namespace::Omg::Xmi
13
14
 
14
15
  map_attribute "isOrdered", to: :is_ordered
15
16
  map_attribute "isNavigable", to: :is_navigable
@@ -11,6 +11,7 @@ module Xmi
11
11
 
12
12
  xml do
13
13
  root "role"
14
+ namespace ::Xmi::Namespace::Omg::Xmi
14
15
 
15
16
  map_attribute :name, to: :name
16
17
  map_attribute :visibility, to: :visibility
@@ -9,6 +9,7 @@ module Xmi
9
9
 
10
10
  xml do
11
11
  root "style"
12
+ namespace ::Xmi::Namespace::Omg::Xmi
12
13
 
13
14
  map_attribute "value", to: :value
14
15
  end
@@ -11,6 +11,7 @@ module Xmi
11
11
 
12
12
  xml do
13
13
  root "type"
14
+ namespace ::Xmi::Namespace::Omg::Xmi
14
15
 
15
16
  map_attribute :aggregation, to: :aggregation
16
17
  map_attribute :multiplicity, to: :multiplicity
@@ -14,6 +14,7 @@ module Xmi
14
14
 
15
15
  xml do
16
16
  root "labels"
17
+ namespace ::Xmi::Namespace::Omg::Xmi
17
18
 
18
19
  map_attribute :rb, to: :rb
19
20
  map_attribute :lb, to: :lb
@@ -10,6 +10,7 @@ module Xmi
10
10
 
11
11
  xml do
12
12
  root "properties"
13
+ namespace ::Xmi::Namespace::Omg::Xmi
13
14
 
14
15
  map_attribute :ea_type, to: :ea_type
15
16
  map_attribute :direction, to: :direction
@@ -12,6 +12,7 @@ module Xmi
12
12
 
13
13
  xml do
14
14
  root "element"
15
+ namespace ::Xmi::Namespace::Omg::Xmi
15
16
 
16
17
  map_attribute "geometry", to: :geometry
17
18
  map_attribute "subject", to: :subject
@@ -25,6 +26,7 @@ module Xmi
25
26
 
26
27
  xml do
27
28
  root "elements"
29
+ namespace ::Xmi::Namespace::Omg::Xmi
28
30
 
29
31
  map_element "element", to: :element, value_map: VALUE_MAP
30
32
  end
@@ -37,6 +39,7 @@ module Xmi
37
39
 
38
40
  xml do
39
41
  root "model"
42
+ namespace ::Xmi::Namespace::Omg::Xmi
40
43
 
41
44
  map_attribute "package", to: :package
42
45
  map_attribute "localID", to: :local_id
@@ -67,6 +70,7 @@ module Xmi
67
70
 
68
71
  xml do
69
72
  root "diagram"
73
+ namespace ::Xmi::Namespace::Omg::Xmi
70
74
 
71
75
  map_attribute "id", to: :id
72
76
 
@@ -89,6 +93,7 @@ module Xmi
89
93
 
90
94
  xml do
91
95
  root "diagrams"
96
+ namespace ::Xmi::Namespace::Omg::Xmi
92
97
 
93
98
  map_element "diagram", to: :diagram, value_map: VALUE_MAP
94
99
  end
@@ -12,6 +12,7 @@ module Xmi
12
12
 
13
13
  xml do
14
14
  root "Association"
15
+ namespace ::Xmi::Namespace::Omg::Xmi
15
16
 
16
17
  map_attribute "id", to: :id
17
18
  map_attribute "start", to: :start
@@ -25,6 +26,7 @@ module Xmi
25
26
 
26
27
  xml do
27
28
  root "Generalization"
29
+ namespace ::Xmi::Namespace::Omg::Xmi
28
30
 
29
31
  map_attribute "id", to: :id
30
32
  map_attribute "start", to: :start
@@ -38,6 +40,7 @@ module Xmi
38
40
 
39
41
  xml do
40
42
  root "Aggregation"
43
+ namespace ::Xmi::Namespace::Omg::Xmi
41
44
 
42
45
  map_attribute "id", to: :id
43
46
  map_attribute "start", to: :start
@@ -51,6 +54,7 @@ module Xmi
51
54
 
52
55
  xml do
53
56
  root "NoteLink"
57
+ namespace ::Xmi::Namespace::Omg::Xmi
54
58
 
55
59
  map_attribute "id", to: :id
56
60
  map_attribute "start", to: :start
@@ -24,6 +24,7 @@ module Xmi
24
24
 
25
25
  xml do
26
26
  root "attribute"
27
+ namespace ::Xmi::Namespace::Omg::Xmi
27
28
 
28
29
  map_attribute "idref", to: :idref
29
30
  map_attribute "name", to: :name
@@ -50,6 +51,7 @@ module Xmi
50
51
 
51
52
  xml do
52
53
  root "attributes"
54
+ namespace ::Xmi::Namespace::Omg::Xmi
53
55
 
54
56
  map_element "attribute", to: :attribute, value_map: VALUE_MAP
55
57
  end
@@ -10,6 +10,7 @@ module Xmi
10
10
 
11
11
  xml do
12
12
  root "bounds"
13
+ namespace ::Xmi::Namespace::Omg::Xmi
13
14
 
14
15
  map_attribute "lower", to: :lower
15
16
  map_attribute "upper", to: :upper
@@ -10,6 +10,7 @@ module Xmi
10
10
 
11
11
  xml do
12
12
  root "code"
13
+ namespace ::Xmi::Namespace::Omg::Xmi
13
14
 
14
15
  map_attribute "gentype", to: :gentype
15
16
  map_attribute "product_name", to: :product_name
@@ -10,6 +10,7 @@ module Xmi
10
10
 
11
11
  xml do
12
12
  root "containment"
13
+ namespace ::Xmi::Namespace::Omg::Xmi
13
14
 
14
15
  map_attribute "containment", to: :containment
15
16
  map_attribute "position", to: :position
@@ -10,6 +10,7 @@ module Xmi
10
10
 
11
11
  xml do
12
12
  root "coords"
13
+ namespace ::Xmi::Namespace::Omg::Xmi
13
14
 
14
15
  map_attribute "ordered", to: :ordered
15
16
  map_attribute "scale", to: :scale
@@ -9,6 +9,7 @@ module Xmi
9
9
 
10
10
  xml do
11
11
  root "documentation"
12
+ namespace ::Xmi::Namespace::Omg::Xmi
12
13
 
13
14
  map_attribute "value", to: :value
14
15
  end
@@ -26,6 +26,7 @@ module Xmi
26
26
 
27
27
  xml do
28
28
  root "element"
29
+ namespace ::Xmi::Namespace::Omg::Xmi
29
30
 
30
31
  map_attribute "idref", to: :idref
31
32
  map_attribute "type", to: :type
@@ -54,6 +55,7 @@ module Xmi
54
55
 
55
56
  xml do
56
57
  root "elements"
58
+ namespace ::Xmi::Namespace::Omg::Xmi
57
59
 
58
60
  map_element "element", to: :element, value_map: VALUE_MAP
59
61
  end