lutaml-xmi 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lutaml/xmi/parsers/xml.rb +6 -3
- data/lib/lutaml/xmi/version.rb +1 -1
- 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: 7496f55ef9bda77a9e3f7d093523e2eeb88afd9e2a7fb40ca0b04d13e0cbb40e
|
4
|
+
data.tar.gz: d1be13d865af258bb93df7161eb44d7946e26535a3d991fbb47c2ee434e90297
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9915d8a496fe08deaba06860f6b02c87963b03c31db00ac6bd0a8100f29a090e2265a2b50e9f86c3d3f9243fbc3e14d91770e8a9200d90bd3fa8d5d09c03ac26
|
7
|
+
data.tar.gz: a0ef7f6293f5aa6a04d7c9bcb16c0d222ebaea26f1e758170ae95d66796ee1c566abc61a62f0b10819c43c9db90f19778f8e189013347e8ede4e640e2d72177e
|
@@ -130,7 +130,7 @@ module Lutaml
|
|
130
130
|
main_model.xpath(%(//element[@xmi:idref="#{xmi_id}"]/links/*)).map do |link|
|
131
131
|
link_member_name = link.attributes["start"].value == xmi_id ? "end" : "start"
|
132
132
|
linke_owner_name = link_member_name == "start" ? "end" : "start"
|
133
|
-
member_end, member_end_type, member_end_cardinality, member_end_attribute_name = serialize_member_type(xmi_id, link, link_member_name)
|
133
|
+
member_end, member_end_type, member_end_cardinality, member_end_attribute_name, member_end_xmi_id = serialize_member_type(xmi_id, link, link_member_name)
|
134
134
|
owner_end, owner_end_cardinality, owner_end_attribute_name = serialize_owned_type(xmi_id, link, linke_owner_name)
|
135
135
|
if member_end && ((member_end_type != 'aggregation') || (member_end_type == 'aggregation' && member_end_attribute_name))
|
136
136
|
doc_node_name = link_member_name == "start" ? "source" : "target"
|
@@ -142,7 +142,9 @@ module Lutaml
|
|
142
142
|
member_end_type: member_end_type,
|
143
143
|
member_end_cardinality: member_end_cardinality,
|
144
144
|
member_end_attribute_name: member_end_attribute_name,
|
145
|
+
member_end_xmi_id: member_end_xmi_id,
|
145
146
|
owner_end: owner_end,
|
147
|
+
owner_end_xmi_id: xmi_id,
|
146
148
|
definition: definition
|
147
149
|
}
|
148
150
|
end
|
@@ -245,7 +247,7 @@ module Lutaml
|
|
245
247
|
end
|
246
248
|
end
|
247
249
|
|
248
|
-
[member_end, "aggregation", member_end_cardinality, member_end_attribute_name]
|
250
|
+
[member_end, "aggregation", member_end_cardinality, member_end_attribute_name, xmi_id]
|
249
251
|
end
|
250
252
|
|
251
253
|
def generalization_association(owner_xmi_id, link)
|
@@ -265,7 +267,7 @@ module Lutaml
|
|
265
267
|
member_end_cardinality = { "min" => cardinality_min_value(assoc), "max" => cardinality_max_value(assoc) }
|
266
268
|
end
|
267
269
|
|
268
|
-
[member_end, member_end_type, member_end_cardinality, nil]
|
270
|
+
[member_end, member_end_type, member_end_cardinality, nil, xmi_id]
|
269
271
|
end
|
270
272
|
|
271
273
|
def class_element_metadata(klass)
|
@@ -281,6 +283,7 @@ module Lutaml
|
|
281
283
|
# xmi_id: klass['xmi:id'],
|
282
284
|
name: attribute["name"],
|
283
285
|
type: lookup_entity_name(type["xmi:idref"]) || type["xmi:idref"],
|
286
|
+
xmi_id: type["xmi:idref"],
|
284
287
|
is_derived: attribute["isDerived"],
|
285
288
|
cardinality: { "min" => cardinality_min_value(attribute), "max" => cardinality_max_value(attribute) },
|
286
289
|
definition: lookup_attribute_definition(attribute),
|
data/lib/lutaml/xmi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml-xmi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|