ea 0.6.179 → 0.6.180
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/database.rb +3 -0
- data/lib/ea/qea/factory/base_transformer.rb +4 -2
- data/lib/ea/qea/factory/data_type_transformer.rb +18 -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: 9871a436545f50a0aa046015be229cfddc4c48524d6ba55c75f6c4ed1f86bc80
|
|
4
|
+
data.tar.gz: 5a976b280ed90ba30a5c557a7f9e6b06a7c342c35ca970fc9fb8773d0997ac23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c7bd8a7ced8456f71d05be1d54d6831d362a48a848fe5e2d013419f7895e1cf0945e393ffb5f0e3aeaa938fb7abf2e027cbad870c868f729b6d3787e69d4559
|
|
7
|
+
data.tar.gz: 7591da0c653deaa6381cdb8e200a8ab411fd4b6fc9f83a55cf16d3da6326b70d3d2968f29bac94e127c3a155a924c78c2206b04e79bb2b5c48e545b2997d6dce
|
data/lib/ea/qea/database.rb
CHANGED
|
@@ -459,6 +459,9 @@ module Ea
|
|
|
459
459
|
@connectors_by_end.each do |id, conns|
|
|
460
460
|
(@connectors_by_object[id] ||= []).concat(conns)
|
|
461
461
|
end
|
|
462
|
+
# A reflexive connector (start and end on the same object) is in
|
|
463
|
+
# both indexes, so it reaches the merged list twice.
|
|
464
|
+
@connectors_by_object.each_value(&:uniq!)
|
|
462
465
|
end
|
|
463
466
|
|
|
464
467
|
def build_diagram_indexes
|
|
@@ -94,11 +94,13 @@ module Ea
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Convert an EA note field (RTF when styled, plain otherwise)
|
|
97
|
-
# to normalized plain text
|
|
97
|
+
# to normalized plain text, stripped as the XMI parser reads it
|
|
98
|
+
# (a plain note's trailing newline otherwise separates a table
|
|
99
|
+
# row directive from its cell and the directive renders as text)
|
|
98
100
|
# @param text [String, nil] RTF or plain note text
|
|
99
101
|
# @return [String, nil] plain text with Unix line endings
|
|
100
102
|
def normalize_note(text)
|
|
101
|
-
normalize_line_endings(Ea::Rtf.to_text(text))
|
|
103
|
+
normalize_line_endings(Ea::Rtf.to_text(text))&.strip
|
|
102
104
|
end
|
|
103
105
|
|
|
104
106
|
# Find object by ID
|
|
@@ -43,11 +43,29 @@ module Ea
|
|
|
43
43
|
# Load associations for this data type
|
|
44
44
|
data_type.associations = load_associations(ea_object.ea_object_id,
|
|
45
45
|
ea_object.ea_guid)
|
|
46
|
+
|
|
47
|
+
# As in the XMI export, the generalization hangs off the data
|
|
48
|
+
# type only when it declares a parent.
|
|
49
|
+
data_type.generalization = load_generalization(
|
|
50
|
+
ea_object.ea_object_id
|
|
51
|
+
)
|
|
46
52
|
end
|
|
47
53
|
end
|
|
48
54
|
|
|
49
55
|
private
|
|
50
56
|
|
|
57
|
+
# The generalization of a data type that has a parent; nil for a root one
|
|
58
|
+
# @param object_id [Integer] Object ID
|
|
59
|
+
# @return [Lutaml::Uml::Generalization, nil] UML generalization
|
|
60
|
+
def load_generalization(object_id)
|
|
61
|
+
connector = Ea::Qea::Rules::Generalization.connector_for(
|
|
62
|
+
object_id, database.connectors_for_object(object_id)
|
|
63
|
+
)
|
|
64
|
+
return nil unless connector
|
|
65
|
+
|
|
66
|
+
GeneralizationBuilder.new(database).load_generalization(object_id)
|
|
67
|
+
end
|
|
68
|
+
|
|
51
69
|
# Load associations for a data type
|
|
52
70
|
# @param object_id [Integer] Object ID
|
|
53
71
|
# @param object_guid [String] Object GUID
|
data/lib/ea/version.rb
CHANGED