archimate 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/archimate.gemspec +2 -1
- data/lib/archimate/color.rb +2 -2
- data/lib/archimate/data_model/any_attribute.rb +4 -10
- data/lib/archimate/data_model/any_element.rb +9 -17
- data/lib/archimate/data_model/bounds.rb +6 -6
- data/lib/archimate/data_model/color.rb +6 -6
- data/lib/archimate/data_model/comparison.rb +101 -5
- data/lib/archimate/data_model/concern.rb +5 -13
- data/lib/archimate/data_model/connection.rb +39 -48
- data/lib/archimate/data_model/connector_type.rb +1 -0
- data/lib/archimate/data_model/diagram.rb +27 -42
- data/lib/archimate/data_model/diagram_type.rb +1 -0
- data/lib/archimate/data_model/element.rb +14 -35
- data/lib/archimate/data_model/elements.rb +681 -0
- data/lib/archimate/data_model/font.rb +8 -8
- data/lib/archimate/data_model/lang_string.rb +10 -36
- data/lib/archimate/data_model/layer.rb +4 -5
- data/lib/archimate/data_model/layers.rb +45 -49
- data/lib/archimate/data_model/location.rb +6 -6
- data/lib/archimate/data_model/metadata.rb +2 -6
- data/lib/archimate/data_model/model.rb +50 -62
- data/lib/archimate/data_model/modeling_note.rb +3 -8
- data/lib/archimate/data_model/organization.rb +18 -27
- data/lib/archimate/data_model/property.rb +9 -8
- data/lib/archimate/data_model/property_definition.rb +15 -21
- data/lib/archimate/data_model/referenceable.rb +14 -9
- data/lib/archimate/data_model/referenceable_list.rb +82 -0
- data/lib/archimate/data_model/relationship.rb +41 -152
- data/lib/archimate/data_model/relationship_references.rb +29 -0
- data/lib/archimate/data_model/relationships.rb +214 -0
- data/lib/archimate/data_model/schema_info.rb +6 -12
- data/lib/archimate/data_model/style.rb +14 -25
- data/lib/archimate/data_model/view_node.rb +38 -66
- data/lib/archimate/data_model/viewpoint.rb +23 -38
- data/lib/archimate/data_model/viewpoint_type.rb +347 -387
- data/lib/archimate/data_model.rb +7 -6
- data/lib/archimate/derived_relations.rb +106 -31
- data/lib/archimate/export/cypher.rb +0 -18
- data/lib/archimate/export/jsonl.rb +16 -45
- data/lib/archimate/export/n_quads.rb +1 -24
- data/lib/archimate/file_formats/archi_file_reader.rb +2 -1
- data/lib/archimate/file_formats/model_exchange_file_writer_21.rb +9 -1
- data/lib/archimate/file_formats/sax/archi/archi_handler_factory.rb +2 -2
- data/lib/archimate/file_formats/sax/archi/connection.rb +2 -1
- data/lib/archimate/file_formats/sax/archi/element.rb +7 -5
- data/lib/archimate/file_formats/sax/archi/relationship.rb +1 -1
- data/lib/archimate/file_formats/sax/model_exchange_file/connection.rb +2 -1
- data/lib/archimate/file_formats/sax/model_exchange_file/element.rb +1 -1
- data/lib/archimate/file_formats/sax/model_exchange_file/relationship.rb +1 -1
- data/lib/archimate/file_formats/sax/model_exchange_file/view_node.rb +0 -1
- data/lib/archimate/file_formats/serializer/archi/relationship.rb +1 -1
- data/lib/archimate/lint/duplicate_entities.rb +46 -42
- data/lib/archimate/svg/archimate.css +12 -2
- data/lib/archimate/svg/entity/base_entity.rb +6 -29
- data/lib/archimate/svg/entity/location.rb +1 -0
- data/lib/archimate/svg/entity_factory.rb +3 -3
- data/lib/archimate/svg/point.rb +3 -3
- data/lib/archimate/svg/svg_template.svg.erb +5 -5
- data/lib/archimate/version.rb +2 -1
- metadata +20 -6
- data/TODOs.org +0 -505
- data/lib/archimate/data_model/differentiable.rb +0 -142
- data/lib/archimate/data_model/element_type.rb +0 -89
- data/lib/archimate/data_model/relationship_type.rb +0 -45
@@ -69,6 +69,11 @@ table.properties>caption {
|
|
69
69
|
stroke: #999;
|
70
70
|
}
|
71
71
|
|
72
|
+
.archimate-location-background {
|
73
|
+
fill: #f9b77a;
|
74
|
+
stroke: #ae8055;
|
75
|
+
}
|
76
|
+
|
72
77
|
.archimate-strategy-background {
|
73
78
|
fill: #eddfac;
|
74
79
|
stroke: #44423b;
|
@@ -181,7 +186,7 @@ table.properties>caption {
|
|
181
186
|
}
|
182
187
|
|
183
188
|
.archimate-assignment-relationship {
|
184
|
-
marker-end: url(#archimate-
|
189
|
+
marker-end: url(#archimate-filled-arrow);
|
185
190
|
marker-start: url(#archimate-dot-marker);
|
186
191
|
}
|
187
192
|
|
@@ -215,7 +220,12 @@ table.properties>caption {
|
|
215
220
|
marker-end: url(#archimate-hollow-arrow);
|
216
221
|
}
|
217
222
|
|
218
|
-
|
223
|
+
.archimate-influence-relationship {
|
224
|
+
marker-end: url(#archimate-open-arrow);
|
225
|
+
stroke-dasharray: 5, 3;
|
226
|
+
}
|
227
|
+
|
228
|
+
/*, .archimate-association-relationship {
|
219
229
|
}
|
220
230
|
*/
|
221
231
|
.archimate-triggering-relationship {
|
@@ -17,49 +17,26 @@ module Archimate
|
|
17
17
|
@text_bounds = child.bounds.reduced_by(2)
|
18
18
|
@bounds_offset = bounds_offset
|
19
19
|
@entity = @child.element || @child
|
20
|
-
@background_class =
|
20
|
+
@background_class = @child&.element&.layer&.background_class
|
21
21
|
@text_align = nil
|
22
22
|
@badge = nil
|
23
23
|
end
|
24
24
|
|
25
|
-
def layer_background_class
|
26
|
-
case child.element&.layer
|
27
|
-
when "Strategy", DataModel::Layers::Strategy
|
28
|
-
"archimate-strategy-background"
|
29
|
-
when "Business", DataModel::Layers::Business
|
30
|
-
"archimate-business-background"
|
31
|
-
when "Application", DataModel::Layers::Application
|
32
|
-
"archimate-application-background"
|
33
|
-
when "Technology", DataModel::Layers::Technology
|
34
|
-
"archimate-infrastructure-background"
|
35
|
-
when "Physical", DataModel::Layers::Physical
|
36
|
-
"archimate-physical-background"
|
37
|
-
when "Motivation", DataModel::Layers::Motivation
|
38
|
-
"archimate-motivation-background"
|
39
|
-
when "Implementation and Migration", DataModel::Layers::Implementation_and_migration
|
40
|
-
"archimate-implementation-background"
|
41
|
-
when "Connectors", DataModel::Layers::Connectors
|
42
|
-
"archimate-connectors-background"
|
43
|
-
else
|
44
|
-
puts "Unexpected layer #{child.element&.layer.inspect}" if child.element&.layer
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
25
|
def to_svg(xml)
|
49
|
-
optional_link(xml)
|
26
|
+
optional_link(xml) do
|
50
27
|
xml.g(group_attrs) do
|
51
28
|
xml.title { xml.text @entity.name } unless @entity.name.nil? || @entity.name.empty?
|
52
|
-
xml.desc { xml.text(@entity.documentation.to_s) }
|
29
|
+
xml.desc { xml.text(@entity.documentation.to_s) } unless @entity.documentation&.empty?
|
53
30
|
entity_shape(xml, child.bounds)
|
54
31
|
entity_badge(xml)
|
55
32
|
entity_label(xml)
|
56
33
|
child.nodes.each { |c| Svg::EntityFactory.make_entity(c, child.bounds).to_svg(xml) }
|
57
34
|
end
|
58
|
-
|
35
|
+
end
|
59
36
|
end
|
60
37
|
|
61
|
-
def optional_link(
|
62
|
-
|
38
|
+
def optional_link(_xml)
|
39
|
+
yield
|
63
40
|
end
|
64
41
|
|
65
42
|
def entity_label(xml)
|
@@ -5,10 +5,10 @@ module Archimate
|
|
5
5
|
module EntityFactory
|
6
6
|
def make_entity(child, bounds_offset)
|
7
7
|
entity = child.element || child
|
8
|
-
klass_name =
|
9
|
-
klass =
|
8
|
+
klass_name = entity.type.sub('archimate:', '')
|
9
|
+
klass = Archimate::Svg::Entity.const_get(klass_name)
|
10
10
|
klass.new(child, bounds_offset)
|
11
|
-
rescue
|
11
|
+
rescue NameError
|
12
12
|
puts "Unsupported entity type #{klass_name}"
|
13
13
|
end
|
14
14
|
module_function :make_entity
|
data/lib/archimate/svg/point.rb
CHANGED
@@ -143,13 +143,13 @@
|
|
143
143
|
</symbol>
|
144
144
|
|
145
145
|
<!-- Line Markers -->
|
146
|
-
<marker id="archimate-dot-marker" viewBox="0 0 10 10" refX="
|
146
|
+
<marker id="archimate-dot-marker" viewBox="0 0 10 10" refX="0" refY="4" markerUnits="strokeWidth" markerWidth="10" markerHeight="10">
|
147
147
|
<circle cx="4" cy="4" r="3" fill="black" stroke="black" />
|
148
148
|
</marker>
|
149
149
|
<marker id="archimate-used-by-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="8" markerHeight="8" orient="auto">
|
150
150
|
<path d="M 1 1 L 9 5 L 1 9" fill="none" stroke="black" style="fill:none;stroke:black;"/>
|
151
151
|
</marker>
|
152
|
-
<marker id="archimate-open-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="8" markerHeight="8" orient="auto">
|
152
|
+
<marker id="archimate-open-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="8" markerHeight="8" orient="auto" stroke="black" fill="none">
|
153
153
|
<path d="M 1 1 L 9 5 L 1 9" fill="none" stroke="black"/>
|
154
154
|
</marker>
|
155
155
|
<marker id="archimate-filled-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="12" markerHeight="12" orient="auto">
|
@@ -158,11 +158,11 @@
|
|
158
158
|
<marker id="archimate-hollow-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="12" markerHeight="12" orient="auto">
|
159
159
|
<polygon points="1,1 9,5 1,9" fill="white" stroke="black"/>
|
160
160
|
</marker>
|
161
|
-
<marker id="archimate-filled-diamond" viewBox="0 0 10 10" refX="1" refY="5" markerUnits="strokeWidth" markerWidth="
|
161
|
+
<marker id="archimate-filled-diamond" viewBox="0 0 10 10" refX="1" refY="5" markerUnits="strokeWidth" markerWidth="24" markerHeight="24" orient="auto">
|
162
162
|
<polygon points="5,2.5 9,5 5,7.5 1,5" fill="black" stroke="black"/>
|
163
163
|
</marker>
|
164
|
-
<marker id="archimate-hollow-diamond" viewBox="0 0
|
165
|
-
<polygon points="5,
|
164
|
+
<marker id="archimate-hollow-diamond" viewBox="0 0 25 25" refX="1" refY="12" markerUnits="strokeWidth" markerWidth="24" markerHeight="24" orient="auto">
|
165
|
+
<polygon points="12.5,6.25 22.5,12.5 12.5,18.75 2.5,12.5" fill="white" stroke="black"/>
|
166
166
|
</marker>
|
167
167
|
</defs>
|
168
168
|
<g id="archimate-diagram"></g>
|
data/lib/archimate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archimate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Morga
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10
|
11
|
+
date: 2017-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -374,6 +374,20 @@ dependencies:
|
|
374
374
|
- - ">="
|
375
375
|
- !ruby/object:Gem::Version
|
376
376
|
version: '0'
|
377
|
+
- !ruby/object:Gem::Dependency
|
378
|
+
name: rubocop
|
379
|
+
requirement: !ruby/object:Gem::Requirement
|
380
|
+
requirements:
|
381
|
+
- - ">="
|
382
|
+
- !ruby/object:Gem::Version
|
383
|
+
version: '0'
|
384
|
+
type: :development
|
385
|
+
prerelease: false
|
386
|
+
version_requirements: !ruby/object:Gem::Requirement
|
387
|
+
requirements:
|
388
|
+
- - ">="
|
389
|
+
- !ruby/object:Gem::Version
|
390
|
+
version: '0'
|
377
391
|
description: A collection of tools for working with ArchiMate files from Archi
|
378
392
|
email:
|
379
393
|
- markmorga@gmail.com
|
@@ -397,7 +411,6 @@ files:
|
|
397
411
|
- LICENSE
|
398
412
|
- README.md
|
399
413
|
- Rakefile
|
400
|
-
- TODOs.org
|
401
414
|
- archimate.gemspec
|
402
415
|
- bin/archimate
|
403
416
|
- bin/console
|
@@ -429,9 +442,8 @@ files:
|
|
429
442
|
- lib/archimate/data_model/connector_type.rb
|
430
443
|
- lib/archimate/data_model/diagram.rb
|
431
444
|
- lib/archimate/data_model/diagram_type.rb
|
432
|
-
- lib/archimate/data_model/differentiable.rb
|
433
445
|
- lib/archimate/data_model/element.rb
|
434
|
-
- lib/archimate/data_model/
|
446
|
+
- lib/archimate/data_model/elements.rb
|
435
447
|
- lib/archimate/data_model/font.rb
|
436
448
|
- lib/archimate/data_model/lang_string.rb
|
437
449
|
- lib/archimate/data_model/layer.rb
|
@@ -445,8 +457,10 @@ files:
|
|
445
457
|
- lib/archimate/data_model/property.rb
|
446
458
|
- lib/archimate/data_model/property_definition.rb
|
447
459
|
- lib/archimate/data_model/referenceable.rb
|
460
|
+
- lib/archimate/data_model/referenceable_list.rb
|
448
461
|
- lib/archimate/data_model/relationship.rb
|
449
|
-
- lib/archimate/data_model/
|
462
|
+
- lib/archimate/data_model/relationship_references.rb
|
463
|
+
- lib/archimate/data_model/relationships.rb
|
450
464
|
- lib/archimate/data_model/schema_info.rb
|
451
465
|
- lib/archimate/data_model/style.rb
|
452
466
|
- lib/archimate/data_model/view_node.rb
|