ea 0.6.182 → 0.6.183
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/ea/qea/factory/data_type_transformer.rb +24 -1
- data/lib/ea/qea/lazy_drops.rb +1 -0
- data/lib/ea/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f0fe4214ceecc675fb0e34ed58cee80366908d4424c6b9ab0a15db493d578e9
|
|
4
|
+
data.tar.gz: f16b57846d2bdc6cac9288a022c9560a2ba3cdd1863d5d7a3e6150e101278cfd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbcd6266bf3c9b6d4ead3fe3c36610df36d9bd3c01a63ac5691bfcadf9326a56a78fc4b4854c1d11feb7e0e3c44a7bf5369d14b240d76c10e3332a1168f495d9
|
|
7
|
+
data.tar.gz: c59b96578cf7907b46fb7f56c13bc295c9b0c33a1e4c3181302f9d31908c784c4b65a3c9d6a695d25fdf052807f6f1ca5c48be9825b010b4c7f8ae63b168c3ef
|
|
@@ -29,7 +29,8 @@ module Ea
|
|
|
29
29
|
ea_object.note.nil? || ea_object.note.empty?
|
|
30
30
|
|
|
31
31
|
# Load and transform attributes
|
|
32
|
-
data_type.attributes = load_attributes(ea_object.ea_object_id)
|
|
32
|
+
data_type.attributes = load_attributes(ea_object.ea_object_id) +
|
|
33
|
+
association_attributes(ea_object.ea_object_id)
|
|
33
34
|
|
|
34
35
|
# Load and transform operations
|
|
35
36
|
data_type.operations = load_operations(ea_object.ea_object_id)
|
|
@@ -52,6 +53,28 @@ module Ea
|
|
|
52
53
|
end
|
|
53
54
|
end
|
|
54
55
|
|
|
56
|
+
# Association-end roles of a data type, appended to its attributes
|
|
57
|
+
# by name as EA's export lists them there; the data type's table
|
|
58
|
+
# renders them as its own association roles.
|
|
59
|
+
# @param object_id [Integer] Object ID
|
|
60
|
+
# @return [Array<Lutaml::Uml::TopElementAttribute>] UML attributes
|
|
61
|
+
def association_attributes(object_id)
|
|
62
|
+
return [] if object_id.nil?
|
|
63
|
+
|
|
64
|
+
AssociationBuilder.new(database)
|
|
65
|
+
.load_association_attributes(object_id)
|
|
66
|
+
.sort_by { |attr| attr.name.to_s.downcase }
|
|
67
|
+
.map do |attr|
|
|
68
|
+
Lutaml::Uml::TopElementAttribute.instantiate(
|
|
69
|
+
name: attr.name,
|
|
70
|
+
type: attr.type,
|
|
71
|
+
cardinality: attr.cardinality,
|
|
72
|
+
definition: attr.definition,
|
|
73
|
+
association: attr.association
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
55
78
|
private
|
|
56
79
|
|
|
57
80
|
# The generalization of a data type that has a parent; nil for a root one
|
data/lib/ea/qea/lazy_drops.rb
CHANGED
data/lib/ea/version.rb
CHANGED