xmi 0.5.3 → 0.5.5
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 +31 -45
- data/README.adoc +0 -15
- data/lib/xmi/custom_profile/abstract.rb +16 -0
- data/lib/xmi/custom_profile/basic_doc.rb +16 -0
- data/lib/xmi/custom_profile/bibliography.rb +16 -0
- data/lib/xmi/custom_profile/edition.rb +18 -0
- data/lib/xmi/custom_profile/enumeration.rb +16 -0
- data/lib/xmi/custom_profile/informative.rb +16 -0
- data/lib/xmi/custom_profile/invariant.rb +16 -0
- data/lib/xmi/custom_profile/number.rb +18 -0
- data/lib/xmi/custom_profile/ocl.rb +16 -0
- data/lib/xmi/custom_profile/persistence.rb +20 -0
- data/lib/xmi/custom_profile/publication_date.rb +18 -0
- data/lib/xmi/custom_profile/year_version.rb +18 -0
- data/lib/xmi/custom_profile.rb +12 -143
- data/lib/xmi/ea_root/code_generation.rb +141 -0
- data/lib/xmi/ea_root/extension_lifecycle.rb +52 -0
- data/lib/xmi/ea_root/namespace_handling.rb +39 -0
- data/lib/xmi/ea_root/xml_parsing.rb +51 -0
- data/lib/xmi/ea_root.rb +16 -403
- 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 +84 -3
- 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: 9a7c79e8d907feee2589c9cd13f534297ffd3869b15bf1c05db190b59903fdaa
|
|
4
|
+
data.tar.gz: f46a5b384fe0f8da80d075766fe226d8519c3b0a72739b66220c606012f098ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e54e2c55800f18215428d8001502c9476d1b63a9dd9db3a164de3e0eae569a0fc405b237adc07e2a2e6fbd789e001a2a57df26cc276b3c9ea8ffccc349159a4
|
|
7
|
+
data.tar.gz: 12c434257662c1a5291f915e97b197497a1153676c57b997e0392b00fc90c08ba712781f859ccdaf4b76f25b17ec3c6277480d9f6a2f5c1b763fe92d24f7341c
|
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-21 01:02:50 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
|
|
@@ -13,87 +13,67 @@ Gemspec/RequiredRubyVersion:
|
|
|
13
13
|
|
|
14
14
|
# Offense count: 1
|
|
15
15
|
# This cop supports safe autocorrection (--autocorrect).
|
|
16
|
-
# Configuration parameters: EnforcedStyle
|
|
17
|
-
# SupportedStyles:
|
|
18
|
-
Layout/
|
|
16
|
+
# Configuration parameters: EnforcedStyle.
|
|
17
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
|
18
|
+
Layout/EmptyLinesAroundBlockBody:
|
|
19
19
|
Exclude:
|
|
20
|
-
- '
|
|
20
|
+
- 'spec/xmi/ea_root/extension_loading_spec.rb'
|
|
21
21
|
|
|
22
|
-
# Offense count:
|
|
22
|
+
# Offense count: 76
|
|
23
23
|
# This cop supports safe autocorrection (--autocorrect).
|
|
24
24
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
25
25
|
# URISchemes: http, https
|
|
26
26
|
Layout/LineLength:
|
|
27
27
|
Enabled: false
|
|
28
28
|
|
|
29
|
-
# Offense count:
|
|
30
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
31
|
-
# Configuration parameters: AllowInHeredoc.
|
|
32
|
-
Layout/TrailingWhitespace:
|
|
33
|
-
Exclude:
|
|
34
|
-
- 'lib/xmi/index.rb'
|
|
35
|
-
|
|
36
|
-
# Offense count: 5
|
|
29
|
+
# Offense count: 6
|
|
37
30
|
# Configuration parameters: AllowedMethods.
|
|
38
31
|
# AllowedMethods: enums
|
|
39
32
|
Lint/ConstantDefinitionInBlock:
|
|
40
33
|
Exclude:
|
|
34
|
+
- 'lib/xmi/sparx/mappings/base_mapping.rb'
|
|
41
35
|
- 'spec/performance/xmi_parsing_spec.rb'
|
|
42
36
|
|
|
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
|
|
37
|
+
# Offense count: 16
|
|
53
38
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
54
39
|
Metrics/AbcSize:
|
|
55
40
|
Exclude:
|
|
56
41
|
- 'lib/tasks/benchmark_runner.rb'
|
|
57
42
|
- 'lib/tasks/performance_comparator.rb'
|
|
58
43
|
- 'lib/tasks/performance_helpers.rb'
|
|
59
|
-
- 'lib/xmi/ea_root.rb'
|
|
60
|
-
- 'lib/xmi/index.rb'
|
|
44
|
+
- 'lib/xmi/ea_root/code_generation.rb'
|
|
45
|
+
- 'lib/xmi/sparx/index.rb'
|
|
61
46
|
- 'lib/xmi/version_registry.rb'
|
|
62
47
|
- 'spec/performance/xmi_parsing_spec.rb'
|
|
63
48
|
|
|
64
|
-
# Offense count:
|
|
49
|
+
# Offense count: 96
|
|
65
50
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
66
51
|
# AllowedMethods: refine
|
|
67
52
|
Metrics/BlockLength:
|
|
68
|
-
Max:
|
|
53
|
+
Max: 98
|
|
69
54
|
|
|
70
|
-
# Offense count:
|
|
55
|
+
# Offense count: 5
|
|
71
56
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
72
57
|
Metrics/CyclomaticComplexity:
|
|
73
58
|
Exclude:
|
|
74
59
|
- 'lib/tasks/performance_helpers.rb'
|
|
75
|
-
- 'lib/xmi/
|
|
60
|
+
- 'lib/xmi/ea_root/code_generation.rb'
|
|
61
|
+
- 'lib/xmi/sparx/index.rb'
|
|
76
62
|
|
|
77
63
|
# Offense count: 28
|
|
78
64
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
79
65
|
Metrics/MethodLength:
|
|
80
|
-
Max:
|
|
66
|
+
Max: 55
|
|
81
67
|
|
|
82
|
-
# Offense count:
|
|
68
|
+
# Offense count: 5
|
|
83
69
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
84
70
|
Metrics/PerceivedComplexity:
|
|
85
71
|
Exclude:
|
|
86
72
|
- 'lib/tasks/performance_helpers.rb'
|
|
87
|
-
- 'lib/xmi/
|
|
73
|
+
- 'lib/xmi/ea_root/code_generation.rb'
|
|
74
|
+
- 'lib/xmi/sparx/index.rb'
|
|
88
75
|
- 'lib/xmi/version_registry.rb'
|
|
89
76
|
|
|
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
77
|
# Offense count: 19
|
|
98
78
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
|
99
79
|
# SupportedStyles: snake_case, normalcase, non_integer
|
|
@@ -132,7 +112,7 @@ RSpec/DescribeClass:
|
|
|
132
112
|
- 'spec/xmi/namespace_aliases_spec.rb'
|
|
133
113
|
- 'spec/xmi/versioning_spec.rb'
|
|
134
114
|
|
|
135
|
-
# Offense count:
|
|
115
|
+
# Offense count: 30
|
|
136
116
|
# Configuration parameters: CountAsOne.
|
|
137
117
|
RSpec/ExampleLength:
|
|
138
118
|
Max: 33
|
|
@@ -142,7 +122,12 @@ RSpec/LeakyConstantDeclaration:
|
|
|
142
122
|
Exclude:
|
|
143
123
|
- 'spec/performance/xmi_parsing_spec.rb'
|
|
144
124
|
|
|
145
|
-
# Offense count:
|
|
125
|
+
# Offense count: 1
|
|
126
|
+
RSpec/MultipleDescribes:
|
|
127
|
+
Exclude:
|
|
128
|
+
- 'spec/xmi/sparx/gml/shared_attributes_spec.rb'
|
|
129
|
+
|
|
130
|
+
# Offense count: 40
|
|
146
131
|
RSpec/MultipleExpectations:
|
|
147
132
|
Max: 8
|
|
148
133
|
|
|
@@ -157,10 +142,11 @@ RSpec/NestedGroups:
|
|
|
157
142
|
Max: 4
|
|
158
143
|
|
|
159
144
|
# Offense count: 1
|
|
160
|
-
#
|
|
161
|
-
|
|
145
|
+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
146
|
+
# SupportedInflectors: default, active_support
|
|
147
|
+
RSpec/SpecFilePathFormat:
|
|
162
148
|
Exclude:
|
|
163
|
-
- '
|
|
149
|
+
- 'spec/xmi/ea_root/extension_loading_spec.rb'
|
|
164
150
|
|
|
165
151
|
# Offense count: 4
|
|
166
152
|
# Configuration parameters: AllowedClasses.
|
data/README.adoc
CHANGED
|
@@ -66,21 +66,6 @@ xmi_root_model = Xmi::Sparx::Root.parse_xml(xml_content)
|
|
|
66
66
|
Ruby classes and modules defined in XML file dynamically.
|
|
67
67
|
Then, you can generate Ruby objects by `Xmi::Sparx::Root.parse_xml`.
|
|
68
68
|
|
|
69
|
-
=== Output Classes and Modules Generated from Extension into Ruby Files
|
|
70
|
-
|
|
71
|
-
You can also generate Ruby files directly from the XMI content:
|
|
72
|
-
|
|
73
|
-
[source,ruby]
|
|
74
|
-
----
|
|
75
|
-
Xmi::EaRoot.load_extension(
|
|
76
|
-
input_xml_path: 'path/to/your/custom_extension.xml',
|
|
77
|
-
module_name: 'CustomModule'
|
|
78
|
-
)
|
|
79
|
-
Xmi::EaRoot.output_rb_file('path/to/output_file.rb')
|
|
80
|
-
----
|
|
81
|
-
|
|
82
|
-
This approach allows you to save the dynamically generated Ruby code to a file for further use.
|
|
83
|
-
|
|
84
69
|
=== Create Extension XML File
|
|
85
70
|
|
|
86
71
|
If you would like to create an extension, which allows to be loaded later, you
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Abstract < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_class, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "Abstract"
|
|
10
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
11
|
+
|
|
12
|
+
map_attribute "base_Class", to: :base_class
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class BasicDoc < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_class, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "BasicDoc"
|
|
10
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
11
|
+
|
|
12
|
+
map_attribute "base_Class", to: :base_class
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Bibliography < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_class, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "Bibliography"
|
|
10
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
11
|
+
|
|
12
|
+
map_attribute "base_Class", to: :base_class
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Edition < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_package, :string
|
|
7
|
+
attribute :edition, :string
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element "edition"
|
|
11
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
12
|
+
|
|
13
|
+
map_attribute "base_Package", to: :base_package
|
|
14
|
+
map_attribute "edition", to: :edition
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Enumeration < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_enumeration, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "enumeration"
|
|
10
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
11
|
+
|
|
12
|
+
map_attribute "base_Enumeration", to: :base_enumeration
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Informative < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_package, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "informative"
|
|
10
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
11
|
+
|
|
12
|
+
map_attribute "base_Package", to: :base_package
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Invariant < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_constraint, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "invariant"
|
|
10
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
11
|
+
|
|
12
|
+
map_attribute "base_Constraint", to: :base_constraint
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Number < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_package, :string
|
|
7
|
+
attribute :number, :string
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element "number"
|
|
11
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
12
|
+
|
|
13
|
+
map_attribute "base_Package", to: :base_package
|
|
14
|
+
map_attribute "number", to: :number
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Ocl < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_constraint, :string
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
element "OCL"
|
|
10
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
11
|
+
|
|
12
|
+
map_attribute "base_Constraint", to: :base_constraint
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class Persistence < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_class, :string
|
|
7
|
+
attribute :base_enumeration, :string
|
|
8
|
+
attribute :persistence, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "persistence"
|
|
12
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
13
|
+
|
|
14
|
+
map_attribute "base_Class", to: :base_class
|
|
15
|
+
map_attribute "base_Enumeration", to: :base_enumeration
|
|
16
|
+
map_attribute "persistence", to: :persistence
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class PublicationDate < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_package, :string
|
|
7
|
+
attribute :publication_date, :string
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element "publicationDate"
|
|
11
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
12
|
+
|
|
13
|
+
map_attribute "base_Package", to: :base_package
|
|
14
|
+
map_attribute "publicationDate", to: :publication_date
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Xmi
|
|
4
|
+
module CustomProfile
|
|
5
|
+
class YearVersion < Lutaml::Model::Serializable
|
|
6
|
+
attribute :base_package, :string
|
|
7
|
+
attribute :year_version, :string
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element "yearVersion"
|
|
11
|
+
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
12
|
+
|
|
13
|
+
map_attribute "base_Package", to: :base_package
|
|
14
|
+
map_attribute "yearVersion", to: :year_version
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
data/lib/xmi/custom_profile.rb
CHANGED
|
@@ -2,148 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module Xmi
|
|
4
4
|
module CustomProfile
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
attribute :base_class, :string
|
|
18
|
-
|
|
19
|
-
xml do
|
|
20
|
-
element "BasicDoc"
|
|
21
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
22
|
-
|
|
23
|
-
map_attribute "base_Class", to: :base_class
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
class Enumeration < Lutaml::Model::Serializable
|
|
28
|
-
attribute :base_enumeration, :string
|
|
29
|
-
|
|
30
|
-
xml do
|
|
31
|
-
element "enumeration"
|
|
32
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
33
|
-
|
|
34
|
-
map_attribute "base_Enumeration", to: :base_enumeration
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
class Ocl < Lutaml::Model::Serializable
|
|
39
|
-
attribute :base_constraint, :string
|
|
40
|
-
|
|
41
|
-
xml do
|
|
42
|
-
element "OCL"
|
|
43
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
44
|
-
|
|
45
|
-
map_attribute "base_Constraint", to: :base_constraint
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
class Invariant < Lutaml::Model::Serializable
|
|
50
|
-
attribute :base_constraint, :string
|
|
51
|
-
|
|
52
|
-
xml do
|
|
53
|
-
element "invariant"
|
|
54
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
55
|
-
|
|
56
|
-
map_attribute "base_Constraint", to: :base_constraint
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
class PublicationDate < Lutaml::Model::Serializable
|
|
61
|
-
attribute :base_package, :string
|
|
62
|
-
attribute :publication_date, :string
|
|
63
|
-
|
|
64
|
-
xml do
|
|
65
|
-
element "publicationDate"
|
|
66
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
67
|
-
|
|
68
|
-
map_attribute "base_Package", to: :base_package
|
|
69
|
-
map_attribute "publicationDate", to: :publication_date
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
class Edition < Lutaml::Model::Serializable
|
|
74
|
-
attribute :base_package, :string
|
|
75
|
-
attribute :edition, :string
|
|
76
|
-
|
|
77
|
-
xml do
|
|
78
|
-
element "edition"
|
|
79
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
80
|
-
|
|
81
|
-
map_attribute "base_Package", to: :base_package
|
|
82
|
-
map_attribute "edition", to: :edition
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
class Number < Lutaml::Model::Serializable
|
|
87
|
-
attribute :base_package, :string
|
|
88
|
-
attribute :number, :string
|
|
89
|
-
|
|
90
|
-
xml do
|
|
91
|
-
element "number"
|
|
92
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
93
|
-
|
|
94
|
-
map_attribute "base_Package", to: :base_package
|
|
95
|
-
map_attribute "number", to: :number
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
class YearVersion < Lutaml::Model::Serializable
|
|
100
|
-
attribute :base_package, :string
|
|
101
|
-
attribute :year_version, :string
|
|
102
|
-
|
|
103
|
-
xml do
|
|
104
|
-
element "yearVersion"
|
|
105
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
106
|
-
|
|
107
|
-
map_attribute "base_Package", to: :base_package
|
|
108
|
-
map_attribute "yearVersion", to: :year_version
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
class Informative < Lutaml::Model::Serializable
|
|
113
|
-
attribute :base_package, :string
|
|
114
|
-
|
|
115
|
-
xml do
|
|
116
|
-
element "informative"
|
|
117
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
118
|
-
|
|
119
|
-
map_attribute "base_Package", to: :base_package
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
class Persistence < Lutaml::Model::Serializable
|
|
124
|
-
attribute :base_class, :string
|
|
125
|
-
attribute :base_enumeration, :string
|
|
126
|
-
attribute :persistence, :string
|
|
127
|
-
|
|
128
|
-
xml do
|
|
129
|
-
element "persistence"
|
|
130
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
131
|
-
|
|
132
|
-
map_attribute "base_Class", to: :base_class
|
|
133
|
-
map_attribute "base_Enumeration", to: :base_enumeration
|
|
134
|
-
map_attribute "persistence", to: :persistence
|
|
135
|
-
end
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
class Abstract < Lutaml::Model::Serializable
|
|
139
|
-
attribute :base_class, :string
|
|
140
|
-
|
|
141
|
-
xml do
|
|
142
|
-
element "Abstract"
|
|
143
|
-
namespace ::Xmi::Namespace::Sparx::CustomProfile
|
|
144
|
-
|
|
145
|
-
map_attribute "base_Class", to: :base_class
|
|
146
|
-
end
|
|
147
|
-
end
|
|
5
|
+
autoload :Bibliography, "xmi/custom_profile/bibliography"
|
|
6
|
+
autoload :BasicDoc, "xmi/custom_profile/basic_doc"
|
|
7
|
+
autoload :Enumeration, "xmi/custom_profile/enumeration"
|
|
8
|
+
autoload :Ocl, "xmi/custom_profile/ocl"
|
|
9
|
+
autoload :Invariant, "xmi/custom_profile/invariant"
|
|
10
|
+
autoload :PublicationDate, "xmi/custom_profile/publication_date"
|
|
11
|
+
autoload :Edition, "xmi/custom_profile/edition"
|
|
12
|
+
autoload :Number, "xmi/custom_profile/number"
|
|
13
|
+
autoload :YearVersion, "xmi/custom_profile/year_version"
|
|
14
|
+
autoload :Informative, "xmi/custom_profile/informative"
|
|
15
|
+
autoload :Persistence, "xmi/custom_profile/persistence"
|
|
16
|
+
autoload :Abstract, "xmi/custom_profile/abstract"
|
|
148
17
|
end
|
|
149
18
|
end
|