lutaml 0.9.37 → 0.9.38
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/lib/lutaml/version.rb +1 -1
- data/lib/lutaml/xmi/liquid_drops/attribute_drop.rb +1 -1
- data/lib/lutaml/xmi/liquid_drops/enum_drop.rb +4 -0
- data/lib/lutaml/xmi/liquid_drops/klass_drop.rb +10 -0
- data/lib/lutaml/xmi/parsers/xmi_base.rb +17 -0
- data/lib/lutaml/xmi/parsers/xml.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f12410a33e4b17ab05b04f225dfc29f02c166593e11f60eb18855377c34f0045
|
4
|
+
data.tar.gz: 3eea93807b6903d9ac1542a9d6dcac3f02e1ebb5cb6a53dcc8e0323343167782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93f8ef8383797613ba709e08a4d7b17b9f89a13a2fea1232987116add58d7fdad7c0eca0665d749a02a8a2052d32164a2c24bf6b281e3ba6493f779ced3cdc70
|
7
|
+
data.tar.gz: 2db73837b21c95b8a7d53820ce43dd32577ca2ea825a964adf8422138eb0fe9afb2445678937a8370d03ad4278cdb8ebd8f00fd7123a939151d2ef855c5f2719
|
data/lib/lutaml/version.rb
CHANGED
@@ -172,6 +172,16 @@ module Lutaml
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
+
def upper_packaged_element
|
176
|
+
if @options[:with_gen]
|
177
|
+
find_upper_level_packaged_element(@model.id)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
def subtype_of
|
182
|
+
find_subtype_of(@model.id)
|
183
|
+
end
|
184
|
+
|
175
185
|
def has_guidance?
|
176
186
|
!!@klass_guidance
|
177
187
|
end
|
@@ -297,6 +297,23 @@ module Lutaml
|
|
297
297
|
@upper_level_cache[klass_id]
|
298
298
|
end
|
299
299
|
|
300
|
+
def find_subtype_of(id) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
301
|
+
@pkg_elements_owned_attributes ||= all_packaged_elements.map do |e|
|
302
|
+
{
|
303
|
+
name: e.name,
|
304
|
+
idrefs: e&.owned_attribute&.map do |oa|
|
305
|
+
oa&.uml_type&.idref
|
306
|
+
end || [],
|
307
|
+
}
|
308
|
+
end
|
309
|
+
|
310
|
+
result = @pkg_elements_owned_attributes.find do |e|
|
311
|
+
e[:idrefs].include?(id)
|
312
|
+
end
|
313
|
+
|
314
|
+
result[:name] if result
|
315
|
+
end
|
316
|
+
|
300
317
|
# Build cache once for all packaged elements
|
301
318
|
def build_upper_level_cache
|
302
319
|
@upper_level_cache = {}
|
@@ -146,6 +146,7 @@ module Lutaml
|
|
146
146
|
with_gen: true,
|
147
147
|
with_absolute_path: true,
|
148
148
|
}
|
149
|
+
puts "Error: Class not found for name: #{name}!" if klass.nil?
|
149
150
|
::Lutaml::XMI::KlassDrop.new(
|
150
151
|
klass,
|
151
152
|
guidance,
|
@@ -168,6 +169,7 @@ module Lutaml
|
|
168
169
|
with_gen: true,
|
169
170
|
with_absolute_path: true,
|
170
171
|
}
|
172
|
+
puts "Error: Enumeration not found for name: #{name}!" if enum.nil?
|
171
173
|
::Lutaml::XMI::EnumDrop.new(enum, options)
|
172
174
|
end
|
173
175
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: expressir
|