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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ffa11bdf4fbb9c95493ef25cb5662107d72e1e708d526b7a6240ed3ffcd4f99
|
|
4
|
+
data.tar.gz: ba939950443a99f5e4c402ec004f4446c9b520486faa0e90aeeaa4bfb4bc679b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a23e73e4194971d9e3f8b83e3b746195ad227dd812e3777c5e3d33b59498e85448a4dd4ef3177f5e297693e7efb9a8e6a7de0ed59d9c0d6e33a1fea7b58a7290
|
|
7
|
+
data.tar.gz: 3ec9666b1313e1f5d0cb426739c7add6fea48253e8d51bf72e04323e2a7213b07877af7867e267f73c70d5c6b44e8b898375d11d137a9ac01868feb2c7cd2a22
|
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-
|
|
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,45 +11,55 @@ Gemspec/RequiredRubyVersion:
|
|
|
11
11
|
Exclude:
|
|
12
12
|
- 'xmi.gemspec'
|
|
13
13
|
|
|
14
|
-
# Offense count:
|
|
14
|
+
# Offense count: 2
|
|
15
15
|
# This cop supports safe autocorrection (--autocorrect).
|
|
16
16
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
17
17
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
18
18
|
Layout/ArgumentAlignment:
|
|
19
19
|
Exclude:
|
|
20
|
-
- 'lib/xmi/
|
|
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'
|
|
21
38
|
|
|
22
|
-
# Offense count:
|
|
39
|
+
# Offense count: 76
|
|
23
40
|
# This cop supports safe autocorrection (--autocorrect).
|
|
24
41
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
25
42
|
# URISchemes: http, https
|
|
26
43
|
Layout/LineLength:
|
|
27
44
|
Enabled: false
|
|
28
45
|
|
|
29
|
-
# Offense count:
|
|
46
|
+
# Offense count: 2
|
|
30
47
|
# This cop supports safe autocorrection (--autocorrect).
|
|
31
48
|
# Configuration parameters: AllowInHeredoc.
|
|
32
49
|
Layout/TrailingWhitespace:
|
|
33
50
|
Exclude:
|
|
34
|
-
- 'lib/xmi/
|
|
51
|
+
- 'lib/xmi/parser_pipeline.rb'
|
|
52
|
+
- 'lib/xmi/sparx/index.rb'
|
|
35
53
|
|
|
36
|
-
# Offense count:
|
|
54
|
+
# Offense count: 6
|
|
37
55
|
# Configuration parameters: AllowedMethods.
|
|
38
56
|
# AllowedMethods: enums
|
|
39
57
|
Lint/ConstantDefinitionInBlock:
|
|
40
58
|
Exclude:
|
|
59
|
+
- 'lib/xmi/sparx/mappings/base_mapping.rb'
|
|
41
60
|
- 'spec/performance/xmi_parsing_spec.rb'
|
|
42
61
|
|
|
43
|
-
# Offense count:
|
|
44
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
45
|
-
# Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
|
|
46
|
-
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
|
|
47
|
-
# AdditionalNilMethods: present?, blank?, try, try!
|
|
48
|
-
Lint/RedundantSafeNavigation:
|
|
49
|
-
Exclude:
|
|
50
|
-
- 'lib/xmi/index.rb'
|
|
51
|
-
|
|
52
|
-
# Offense count: 14
|
|
62
|
+
# Offense count: 15
|
|
53
63
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
54
64
|
Metrics/AbcSize:
|
|
55
65
|
Exclude:
|
|
@@ -57,24 +67,24 @@ Metrics/AbcSize:
|
|
|
57
67
|
- 'lib/tasks/performance_comparator.rb'
|
|
58
68
|
- 'lib/tasks/performance_helpers.rb'
|
|
59
69
|
- 'lib/xmi/ea_root.rb'
|
|
60
|
-
- 'lib/xmi/index.rb'
|
|
70
|
+
- 'lib/xmi/sparx/index.rb'
|
|
61
71
|
- 'lib/xmi/version_registry.rb'
|
|
62
72
|
- 'spec/performance/xmi_parsing_spec.rb'
|
|
63
73
|
|
|
64
|
-
# Offense count:
|
|
74
|
+
# Offense count: 96
|
|
65
75
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
66
76
|
# AllowedMethods: refine
|
|
67
77
|
Metrics/BlockLength:
|
|
68
|
-
Max:
|
|
78
|
+
Max: 98
|
|
69
79
|
|
|
70
80
|
# Offense count: 4
|
|
71
81
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
72
82
|
Metrics/CyclomaticComplexity:
|
|
73
83
|
Exclude:
|
|
74
84
|
- 'lib/tasks/performance_helpers.rb'
|
|
75
|
-
- 'lib/xmi/index.rb'
|
|
85
|
+
- 'lib/xmi/sparx/index.rb'
|
|
76
86
|
|
|
77
|
-
# Offense count:
|
|
87
|
+
# Offense count: 29
|
|
78
88
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
79
89
|
Metrics/MethodLength:
|
|
80
90
|
Max: 33
|
|
@@ -84,16 +94,9 @@ Metrics/MethodLength:
|
|
|
84
94
|
Metrics/PerceivedComplexity:
|
|
85
95
|
Exclude:
|
|
86
96
|
- 'lib/tasks/performance_helpers.rb'
|
|
87
|
-
- 'lib/xmi/index.rb'
|
|
97
|
+
- 'lib/xmi/sparx/index.rb'
|
|
88
98
|
- 'lib/xmi/version_registry.rb'
|
|
89
99
|
|
|
90
|
-
# Offense count: 3
|
|
91
|
-
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
92
|
-
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
93
|
-
Naming/MethodParameterName:
|
|
94
|
-
Exclude:
|
|
95
|
-
- 'lib/xmi/index.rb'
|
|
96
|
-
|
|
97
100
|
# Offense count: 19
|
|
98
101
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
|
99
102
|
# SupportedStyles: snake_case, normalcase, non_integer
|
|
@@ -160,7 +163,7 @@ RSpec/NestedGroups:
|
|
|
160
163
|
# This cop supports safe autocorrection (--autocorrect).
|
|
161
164
|
Style/MultilineIfModifier:
|
|
162
165
|
Exclude:
|
|
163
|
-
- 'lib/xmi/index.rb'
|
|
166
|
+
- 'lib/xmi/sparx/index.rb'
|
|
164
167
|
|
|
165
168
|
# Offense count: 4
|
|
166
169
|
# Configuration parameters: AllowedClasses.
|
data/lib/xmi/extension.rb
CHANGED
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Xmi
|
|
4
4
|
class Extension < Lutaml::Model::Serializable
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|