archimate 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/Gemfile +1 -0
- data/README.md +10 -55
- data/Rakefile +19 -1
- data/archimate.gemspec +16 -14
- data/bin/archimate +12 -0
- data/lib/archimate/cli/archi.rb +38 -19
- data/lib/archimate/cli/cleanup.rb +41 -25
- data/lib/archimate/cli/duper.rb +0 -1
- data/lib/archimate/cli/mapper.rb +53 -40
- data/lib/archimate/cli/svger.rb +33 -4
- data/lib/archimate/core_refinements.rb +41 -0
- data/lib/archimate/data_model/bounds.rb +14 -4
- data/lib/archimate/data_model/comparison.rb +3 -27
- data/lib/archimate/data_model/connection.rb +26 -11
- data/lib/archimate/data_model/diagram.rb +17 -10
- data/lib/archimate/data_model/element.rb +21 -9
- data/lib/archimate/data_model/elements.rb +24 -18
- data/lib/archimate/data_model/lang_string.rb +34 -10
- data/lib/archimate/data_model/layer.rb +6 -0
- data/lib/archimate/data_model/location.rb +10 -13
- data/lib/archimate/data_model/model.rb +55 -43
- data/lib/archimate/data_model/organization.rb +21 -5
- data/lib/archimate/data_model/property.rb +0 -6
- data/lib/archimate/data_model/referenceable.rb +29 -3
- data/lib/archimate/data_model/referenceable_list.rb +34 -14
- data/lib/archimate/data_model/relationship.rb +29 -8
- data/lib/archimate/data_model/relationship_references.rb +115 -6
- data/lib/archimate/data_model/relationships.rb +15 -0
- data/lib/archimate/data_model/view_node.rb +20 -13
- data/lib/archimate/data_model/viewpoint.rb +13 -1
- data/lib/archimate/data_model/viewpoints.rb +416 -0
- data/lib/archimate/data_model.rb +7 -1
- data/lib/archimate/derived_relations.rb +2 -11
- data/lib/archimate/export/cypher.rb +6 -5
- data/lib/archimate/file_format.rb +1 -0
- data/lib/archimate/file_formats/archi_file_reader.rb +11 -1
- data/lib/archimate/file_formats/archi_file_writer.rb +15 -46
- data/lib/archimate/file_formats/archi_file_writer_4.rb +14 -0
- data/lib/archimate/file_formats/model_exchange_file_reader.rb +2 -1
- data/lib/archimate/file_formats/model_exchange_file_writer_21.rb +1 -0
- data/lib/archimate/file_formats/sax/archi/diagram.rb +53 -13
- data/lib/archimate/file_formats/sax/archi/location.rb +1 -3
- data/lib/archimate/file_formats/sax/model_exchange_file/diagram.rb +13 -2
- data/lib/archimate/file_formats/sax.rb +1 -0
- data/lib/archimate/file_formats/serializer/archi/archi_file_writer.rb +63 -0
- data/lib/archimate/file_formats/serializer/archi/archi_file_writer_3.rb +18 -0
- data/lib/archimate/file_formats/serializer/archi/archi_file_writer_4.rb +18 -0
- data/lib/archimate/file_formats/serializer/archi/bounds.rb +2 -2
- data/lib/archimate/file_formats/serializer/archi/connection.rb +24 -13
- data/lib/archimate/file_formats/serializer/archi/diagram.rb +3 -3
- data/lib/archimate/file_formats/serializer/archi/element.rb +2 -2
- data/lib/archimate/file_formats/serializer/archi/organization.rb +1 -1
- data/lib/archimate/file_formats/serializer/archi/property.rb +1 -1
- data/lib/archimate/file_formats/serializer/archi/relationship.rb +2 -2
- data/lib/archimate/file_formats/serializer/archi/view_node.rb +20 -22
- data/lib/archimate/file_formats/serializer/archi/viewpoint3.rb +43 -0
- data/lib/archimate/file_formats/serializer/archi/viewpoint4.rb +41 -0
- data/lib/archimate/file_formats/serializer/model_exchange_file/style.rb +3 -7
- data/lib/archimate/file_formats/serializer/model_exchange_file/v21/diagram.rb +3 -3
- data/lib/archimate/file_formats/serializer/model_exchange_file/v21/model.rb +9 -2
- data/lib/archimate/file_formats/serializer/model_exchange_file/v21/view_node.rb +1 -1
- data/lib/archimate/file_formats/serializer/model_exchange_file/v21/viewpoint.rb +23 -0
- data/lib/archimate/file_formats/serializer/model_exchange_file/v30/diagram.rb +3 -3
- data/lib/archimate/file_formats/serializer/model_exchange_file/v30/model.rb +5 -7
- data/lib/archimate/file_formats/serializer/model_exchange_file/v30/view_node.rb +3 -3
- data/lib/archimate/file_formats/serializer/writer.rb +0 -5
- data/lib/archimate/file_formats/serializer.rb +6 -2
- data/lib/archimate/lint/duplicate_entities.rb +5 -5
- data/lib/archimate/lint/linter.rb +4 -4
- data/lib/archimate/maybe_io.rb +3 -2
- data/lib/archimate/svg/archimate.css +19 -21
- data/lib/archimate/svg/connection.rb +1 -1
- data/lib/archimate/svg/diagram.rb +1 -6
- data/lib/archimate/svg/entity/application_component.rb +9 -3
- data/lib/archimate/svg/entity/constraint.rb +0 -1
- data/lib/archimate/svg/entity/contract.rb +9 -0
- data/lib/archimate/svg/entity/data_entity.rb +1 -1
- data/lib/archimate/svg/entity/device.rb +1 -1
- data/lib/archimate/svg/entity/event_entity.rb +24 -7
- data/lib/archimate/svg/entity/group.rb +23 -4
- data/lib/archimate/svg/entity/grouping.rb +37 -0
- data/lib/archimate/svg/entity/interface_entity.rb +1 -1
- data/lib/archimate/svg/entity/node.rb +1 -1
- data/lib/archimate/svg/entity/outcome.rb +0 -1
- data/lib/archimate/svg/entity/principle.rb +0 -1
- data/lib/archimate/svg/entity/process_entity.rb +1 -1
- data/lib/archimate/svg/entity/requirement.rb +0 -1
- data/lib/archimate/svg/entity/service_entity.rb +6 -13
- data/lib/archimate/svg/entity.rb +1 -0
- data/lib/archimate/svg/entity_factory.rb +9 -5
- data/lib/archimate/svg/path.rb +57 -46
- data/lib/archimate/svg/point.rb +4 -0
- data/lib/archimate/svg/segment.rb +30 -0
- data/lib/archimate/svg/svg_template.svg.erb +11 -3
- data/lib/archimate/svg/view_node.rb +22 -0
- data/lib/archimate/version.rb +1 -1
- data/lib/archimate.rb +3 -2
- metadata +54 -54
- data/exe/archidiff +0 -7
- data/exe/archidiff-summary +0 -7
- data/exe/archimerge +0 -7
- data/exe/fmtxml +0 -7
- data/lib/archimate/data_model/viewpoint_type.rb +0 -389
- data/lib/archimate/file_formats/serializer/archi/location.rb +0 -26
- data/lib/archimate/file_formats/serializer/archi/viewpoint_type.rb +0 -45
- data/lib/archimate/svg/child.rb +0 -29
@@ -1,389 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "ruby-enum"
|
4
|
-
|
5
|
-
module Archimate
|
6
|
-
module DataModel
|
7
|
-
class ViewpointType
|
8
|
-
include Ruby::Enum
|
9
|
-
|
10
|
-
ENTITIES = Elements.classes
|
11
|
-
|
12
|
-
CORE_ELEMENTS = Elements.classes.select do |el|
|
13
|
-
[Layers::Business, Layers::Application, Layers::Technology].include?(el::LAYER)
|
14
|
-
end
|
15
|
-
|
16
|
-
DEFAULT_RELATIONS = [
|
17
|
-
Relationships::Access,
|
18
|
-
Relationships::Aggregation,
|
19
|
-
Relationships::Assignment,
|
20
|
-
Relationships::Association,
|
21
|
-
Relationships::Composition,
|
22
|
-
Relationships::Flow,
|
23
|
-
Relationships::Realization,
|
24
|
-
Relationships::Specialization,
|
25
|
-
Relationships::Triggering,
|
26
|
-
Relationships::Serving
|
27
|
-
].freeze
|
28
|
-
|
29
|
-
ViewpointTypeVal = Struct.new(:name, :entities, :relations) do
|
30
|
-
def to_s
|
31
|
-
name
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# Basic Viewpoints
|
36
|
-
define :Introductory, ViewpointTypeVal.new(
|
37
|
-
"Introductory",
|
38
|
-
CORE_ELEMENTS,
|
39
|
-
Relationships.classes
|
40
|
-
)
|
41
|
-
|
42
|
-
# Category:Composition Viewpoints that defines internal compositions and aggregations of elements.
|
43
|
-
define :Organization, ViewpointTypeVal.new(
|
44
|
-
"Organization",
|
45
|
-
ConnectorType.values + [
|
46
|
-
Elements::BusinessActor, Elements::BusinessCollaboration,
|
47
|
-
Elements::BusinessInterface, Elements::BusinessRole,
|
48
|
-
Elements::Location
|
49
|
-
],
|
50
|
-
DEFAULT_RELATIONS - [Relationships::Access, Relationships::Realization]
|
51
|
-
)
|
52
|
-
|
53
|
-
define :Application_platform, ViewpointTypeVal.new(
|
54
|
-
"Application Platform",
|
55
|
-
CORE_ELEMENTS,
|
56
|
-
Relationships.classes
|
57
|
-
)
|
58
|
-
|
59
|
-
define :Information_structure, ViewpointTypeVal.new(
|
60
|
-
"Information Structure",
|
61
|
-
ConnectorType.values + [
|
62
|
-
Elements::Artifact, Elements::BusinessObject, Elements::DataObject,
|
63
|
-
Elements::Meaning, Elements::Representation
|
64
|
-
],
|
65
|
-
DEFAULT_RELATIONS - [Relationships::Assignment, Relationships::Serving]
|
66
|
-
)
|
67
|
-
|
68
|
-
define :Technology, ViewpointTypeVal.new(
|
69
|
-
"Technology",
|
70
|
-
CORE_ELEMENTS,
|
71
|
-
Relationships.classes
|
72
|
-
)
|
73
|
-
|
74
|
-
define :Layered, ViewpointTypeVal.new(
|
75
|
-
"Layered",
|
76
|
-
ENTITIES + ConnectorType.values,
|
77
|
-
Relationships.classes
|
78
|
-
)
|
79
|
-
|
80
|
-
define :Physical, ViewpointTypeVal.new(
|
81
|
-
"Physical",
|
82
|
-
CORE_ELEMENTS,
|
83
|
-
Relationships.classes
|
84
|
-
)
|
85
|
-
|
86
|
-
# Category:Support Viewpoints where you are looking at elements that are
|
87
|
-
# supported by other elements. Typically from one layer and upwards to an
|
88
|
-
# above layer.
|
89
|
-
define :Product, ViewpointTypeVal.new(
|
90
|
-
"Product",
|
91
|
-
ConnectorType.values + [
|
92
|
-
Elements::ApplicationComponent, Elements::ApplicationInterface,
|
93
|
-
Elements::ApplicationService, Elements::BusinessActor,
|
94
|
-
Elements::BusinessEvent, Elements::BusinessFunction,
|
95
|
-
Elements::BusinessInteraction, Elements::BusinessInterface,
|
96
|
-
Elements::BusinessProcess, Elements::BusinessRole,
|
97
|
-
Elements::BusinessService, Elements::Contract,
|
98
|
-
Elements::Product, Elements::Value
|
99
|
-
],
|
100
|
-
DEFAULT_RELATIONS
|
101
|
-
)
|
102
|
-
|
103
|
-
define :Application_usage, ViewpointTypeVal.new(
|
104
|
-
"Application Usage",
|
105
|
-
ConnectorType.values + [
|
106
|
-
Elements::ApplicationCollaboration, Elements::ApplicationComponent,
|
107
|
-
Elements::ApplicationInterface, Elements::ApplicationService,
|
108
|
-
Elements::BusinessEvent, Elements::BusinessFunction,
|
109
|
-
Elements::BusinessInteraction, Elements::BusinessObject,
|
110
|
-
Elements::BusinessProcess, Elements::BusinessRole,
|
111
|
-
Elements::DataObject
|
112
|
-
],
|
113
|
-
DEFAULT_RELATIONS
|
114
|
-
)
|
115
|
-
|
116
|
-
define :Technology_usage, ViewpointTypeVal.new(
|
117
|
-
"Technology Usage",
|
118
|
-
CORE_ELEMENTS,
|
119
|
-
Relationships.classes
|
120
|
-
)
|
121
|
-
|
122
|
-
# Category:Cooperation Towards peer elements which cooperate with each
|
123
|
-
# other. Typically across aspects.
|
124
|
-
define :Business_process_cooperation, ViewpointTypeVal.new(
|
125
|
-
"Business Process Cooperation",
|
126
|
-
ConnectorType.values + [
|
127
|
-
Elements::ApplicationService, Elements::BusinessActor,
|
128
|
-
Elements::BusinessCollaboration, Elements::BusinessEvent,
|
129
|
-
Elements::BusinessFunction, Elements::BusinessInteraction,
|
130
|
-
Elements::BusinessObject, Elements::BusinessProcess,
|
131
|
-
Elements::BusinessRole, Elements::BusinessService,
|
132
|
-
Elements::Location, Elements::Representation
|
133
|
-
],
|
134
|
-
DEFAULT_RELATIONS
|
135
|
-
)
|
136
|
-
|
137
|
-
define :Application_cooperation, ViewpointTypeVal.new(
|
138
|
-
"Application Cooperation",
|
139
|
-
ConnectorType.values + [
|
140
|
-
Elements::ApplicationCollaboration, Elements::ApplicationComponent,
|
141
|
-
Elements::ApplicationFunction, Elements::ApplicationInteraction,
|
142
|
-
Elements::ApplicationInterface, Elements::ApplicationService,
|
143
|
-
Elements::DataObject, Elements::Location
|
144
|
-
],
|
145
|
-
DEFAULT_RELATIONS
|
146
|
-
)
|
147
|
-
|
148
|
-
# Category:Realization Viewpoints where you are looking at elements that
|
149
|
-
# realize other elements. Typically from one layer and downwards to a
|
150
|
-
# below layer.
|
151
|
-
define :Service_realization, ViewpointTypeVal.new(
|
152
|
-
"Service Realization",
|
153
|
-
ConnectorType.values + [
|
154
|
-
Elements::ApplicationCollaboration, Elements::ApplicationComponent,
|
155
|
-
Elements::ApplicationService, Elements::BusinessActor,
|
156
|
-
Elements::BusinessCollaboration, Elements::BusinessEvent,
|
157
|
-
Elements::BusinessFunction, Elements::BusinessInteraction,
|
158
|
-
Elements::BusinessObject, Elements::BusinessProcess,
|
159
|
-
Elements::BusinessRole, Elements::BusinessService,
|
160
|
-
Elements::DataObject
|
161
|
-
],
|
162
|
-
DEFAULT_RELATIONS
|
163
|
-
)
|
164
|
-
|
165
|
-
define :Implementation_and_deployment, ViewpointTypeVal.new(
|
166
|
-
"Implementation and Deployment",
|
167
|
-
ConnectorType.values + [
|
168
|
-
Elements::ApplicationCollaboration, Elements::ApplicationComponent,
|
169
|
-
Elements::Artifact, Elements::CommunicationPath,
|
170
|
-
Elements::DataObject, Elements::Device,
|
171
|
-
Elements::InfrastructureService, Elements::Network, Elements::Node,
|
172
|
-
Elements::SystemSoftware
|
173
|
-
],
|
174
|
-
DEFAULT_RELATIONS
|
175
|
-
)
|
176
|
-
|
177
|
-
define :Goal_realization, ViewpointTypeVal.new(
|
178
|
-
"Goal Realization",
|
179
|
-
[
|
180
|
-
Elements::Constraint, Elements::Goal, Elements::Principle,
|
181
|
-
Elements::Requirement
|
182
|
-
],
|
183
|
-
[
|
184
|
-
Relationships::Aggregation, Relationships::Association,
|
185
|
-
Relationships::Composition, Relationships::Influence,
|
186
|
-
Relationships::Realization, Relationships::Specialization
|
187
|
-
]
|
188
|
-
)
|
189
|
-
|
190
|
-
define :Goal_contribution, ViewpointTypeVal.new(
|
191
|
-
"Goal Contribution",
|
192
|
-
[
|
193
|
-
Elements::Constraint, Elements::Goal, Elements::Principle,
|
194
|
-
Elements::Requirement
|
195
|
-
],
|
196
|
-
[
|
197
|
-
Relationships::Aggregation, Relationships::Association,
|
198
|
-
Relationships::Composition, Relationships::Influence,
|
199
|
-
Relationships::Realization, Relationships::Specialization
|
200
|
-
]
|
201
|
-
)
|
202
|
-
|
203
|
-
define :Principles, ViewpointTypeVal.new(
|
204
|
-
"Principles",
|
205
|
-
[Elements::Goal, Elements::Principle],
|
206
|
-
[
|
207
|
-
Relationships::Aggregation, Relationships::Association,
|
208
|
-
Relationships::Composition, Relationships::Influence,
|
209
|
-
Relationships::Realization, Relationships::Specialization
|
210
|
-
]
|
211
|
-
)
|
212
|
-
|
213
|
-
define :Requirements_realization, ViewpointTypeVal.new(
|
214
|
-
"Requirements Realization",
|
215
|
-
CORE_ELEMENTS + ConnectorType.values + [
|
216
|
-
Elements::Constraint, Elements::Goal, Elements::Requirement
|
217
|
-
],
|
218
|
-
DEFAULT_RELATIONS
|
219
|
-
)
|
220
|
-
|
221
|
-
define :Motivation, ViewpointTypeVal.new(
|
222
|
-
"Motivation",
|
223
|
-
[
|
224
|
-
Elements::Assessment, Elements::Constraint, Elements::Driver,
|
225
|
-
Elements::Goal, Elements::Principle, Elements::Requirement,
|
226
|
-
Elements::Stakeholder
|
227
|
-
],
|
228
|
-
[
|
229
|
-
Relationships::Aggregation, Relationships::Association,
|
230
|
-
Relationships::Composition, Relationships::Flow,
|
231
|
-
Relationships::Influence, Relationships::Realization,
|
232
|
-
Relationships::Specialization
|
233
|
-
]
|
234
|
-
)
|
235
|
-
|
236
|
-
# Strategy Viewpoints
|
237
|
-
define :Strategy, ViewpointTypeVal.new(
|
238
|
-
"Strategy", CORE_ELEMENTS, Relationships.classes
|
239
|
-
)
|
240
|
-
|
241
|
-
define :Capability_map, ViewpointTypeVal.new(
|
242
|
-
"Capability Map", CORE_ELEMENTS, Relationships.classes
|
243
|
-
)
|
244
|
-
|
245
|
-
define :Outcome_realization, ViewpointTypeVal.new(
|
246
|
-
"Outcome Realization", CORE_ELEMENTS, Relationships.classes
|
247
|
-
)
|
248
|
-
|
249
|
-
define :Resource_map, ViewpointTypeVal.new(
|
250
|
-
"Resource Map", CORE_ELEMENTS, Relationships.classes
|
251
|
-
)
|
252
|
-
|
253
|
-
# Implementation and Migration Viewpoints
|
254
|
-
define :Project, ViewpointTypeVal.new(
|
255
|
-
"Project",
|
256
|
-
ConnectorType.values + [
|
257
|
-
Elements::BusinessActor, Elements::BusinessRole,
|
258
|
-
Elements::Deliverable, Elements::Goal, Elements::WorkPackage
|
259
|
-
],
|
260
|
-
DEFAULT_RELATIONS - [Relationships::Access]
|
261
|
-
)
|
262
|
-
|
263
|
-
define :Migration, ViewpointTypeVal.new(
|
264
|
-
"Migration",
|
265
|
-
ConnectorType.values + [Elements::Gap, Elements::Plateau],
|
266
|
-
[
|
267
|
-
Relationships::AndJunction, Relationships::Association,
|
268
|
-
Relationships::Composition, Relationships::Flow,
|
269
|
-
Relationships::Junction, Relationships::OrJunction,
|
270
|
-
Relationships::Triggering
|
271
|
-
]
|
272
|
-
)
|
273
|
-
|
274
|
-
define :Implementation_and_migration, ViewpointTypeVal.new(
|
275
|
-
"Implementation and Migration",
|
276
|
-
CORE_ELEMENTS + ConnectorType.values + [
|
277
|
-
Elements::Location, Elements::Requirement, Elements::Constraint,
|
278
|
-
Elements::Goal, Elements::BusinessRole, Elements::WorkPackage,
|
279
|
-
Elements::Deliverable, Elements::BusinessActor, Elements::Plateau,
|
280
|
-
Elements::Gap
|
281
|
-
],
|
282
|
-
DEFAULT_RELATIONS
|
283
|
-
)
|
284
|
-
|
285
|
-
# Other Viewpoints
|
286
|
-
define :Stakeholder, ViewpointTypeVal.new(
|
287
|
-
"Stakeholder",
|
288
|
-
[
|
289
|
-
Elements::Assessment, Elements::Driver, Elements::Goal,
|
290
|
-
Elements::Stakeholder
|
291
|
-
],
|
292
|
-
[
|
293
|
-
Relationships::Aggregation, Relationships::Association,
|
294
|
-
Relationships::Composition, Relationships::Influence,
|
295
|
-
Relationships::Specialization
|
296
|
-
]
|
297
|
-
)
|
298
|
-
|
299
|
-
# Other older viewpoints
|
300
|
-
define :Actor_cooperation, ViewpointTypeVal.new(
|
301
|
-
"Actor Co-operation",
|
302
|
-
ConnectorType.values + [
|
303
|
-
Elements::ApplicationComponent, Elements::ApplicationInterface,
|
304
|
-
Elements::ApplicationService, Elements::BusinessActor,
|
305
|
-
Elements::BusinessCollaboration, Elements::BusinessInterface,
|
306
|
-
Elements::BusinessRole, Elements::BusinessService
|
307
|
-
],
|
308
|
-
DEFAULT_RELATIONS - [Relationships::Access]
|
309
|
-
)
|
310
|
-
|
311
|
-
define :Business_function, ViewpointTypeVal.new(
|
312
|
-
"Business Function",
|
313
|
-
ConnectorType.values + [
|
314
|
-
Elements::BusinessActor, Elements::BusinessFunction,
|
315
|
-
Elements::BusinessRole
|
316
|
-
],
|
317
|
-
DEFAULT_RELATIONS - [Relationships::Access, Relationships::Realization]
|
318
|
-
)
|
319
|
-
|
320
|
-
define :Business_process, ViewpointTypeVal.new(
|
321
|
-
"Business Process",
|
322
|
-
ConnectorType.values + [
|
323
|
-
Elements::ApplicationService, Elements::BusinessActor,
|
324
|
-
Elements::BusinessCollaboration, Elements::BusinessEvent,
|
325
|
-
Elements::BusinessFunction, Elements::BusinessInteraction,
|
326
|
-
Elements::BusinessObject, Elements::BusinessProcess,
|
327
|
-
Elements::BusinessRole, Elements::BusinessService,
|
328
|
-
Elements::Location, Elements::Representation
|
329
|
-
],
|
330
|
-
DEFAULT_RELATIONS
|
331
|
-
)
|
332
|
-
|
333
|
-
define :Application_behavior, ViewpointTypeVal.new(
|
334
|
-
"Application Behavior",
|
335
|
-
ConnectorType.values + [
|
336
|
-
Elements::ApplicationCollaboration, Elements::ApplicationComponent,
|
337
|
-
Elements::ApplicationFunction, Elements::ApplicationInteraction,
|
338
|
-
Elements::ApplicationInterface, Elements::ApplicationService,
|
339
|
-
Elements::DataObject
|
340
|
-
],
|
341
|
-
DEFAULT_RELATIONS
|
342
|
-
)
|
343
|
-
|
344
|
-
define :Application_structure, ViewpointTypeVal.new(
|
345
|
-
"Application Structure",
|
346
|
-
ConnectorType.values + [
|
347
|
-
Elements::ApplicationCollaboration, Elements::ApplicationComponent,
|
348
|
-
Elements::ApplicationInterface, Elements::DataObject
|
349
|
-
],
|
350
|
-
DEFAULT_RELATIONS - [Relationships::Realization]
|
351
|
-
)
|
352
|
-
|
353
|
-
define :Infrastructure, ViewpointTypeVal.new(
|
354
|
-
"Infrastructure",
|
355
|
-
ConnectorType.values + [
|
356
|
-
Elements::Artifact, Elements::CommunicationPath, Elements::Device,
|
357
|
-
Elements::InfrastructureFunction, Elements::InfrastructureInterface,
|
358
|
-
Elements::InfrastructureService, Elements::Location,
|
359
|
-
Elements::Network, Elements::Node, Elements::SystemSoftware
|
360
|
-
],
|
361
|
-
DEFAULT_RELATIONS
|
362
|
-
)
|
363
|
-
|
364
|
-
define :Infrastructure_usage, ViewpointTypeVal.new(
|
365
|
-
"Infrastructure Usage",
|
366
|
-
ConnectorType.values + [
|
367
|
-
Elements::ApplicationComponent, Elements::ApplicationFunction,
|
368
|
-
Elements::CommunicationPath, Elements::Device,
|
369
|
-
Elements::InfrastructureFunction, Elements::InfrastructureInterface,
|
370
|
-
Elements::InfrastructureService, Elements::Network, Elements::Node,
|
371
|
-
Elements::SystemSoftware
|
372
|
-
],
|
373
|
-
DEFAULT_RELATIONS
|
374
|
-
)
|
375
|
-
|
376
|
-
define :Landscape_map, ViewpointTypeVal.new(
|
377
|
-
"Landscape Map", ENTITIES + ConnectorType.values, Relationships.classes
|
378
|
-
)
|
379
|
-
|
380
|
-
def self.[](idx)
|
381
|
-
values[idx]
|
382
|
-
end
|
383
|
-
end
|
384
|
-
|
385
|
-
VIEWPOINT_CONTENT_ENUM = %w[Details Coherence Overview].freeze
|
386
|
-
|
387
|
-
VIEWPOINT_PURPOSE_ENUM = %w[Designing Deciding Informing].freeze
|
388
|
-
end
|
389
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Archimate
|
4
|
-
module FileFormats
|
5
|
-
module Serializer
|
6
|
-
module Archi
|
7
|
-
module Location
|
8
|
-
# startX = location.x - source_attachment.x
|
9
|
-
# startY = location.y - source_attachment.y
|
10
|
-
# endX = location.x - target_attachment.x
|
11
|
-
# endY = location.y - source_attachment.y
|
12
|
-
def serialize_location(xml, bendpoint)
|
13
|
-
xml.bendpoint(
|
14
|
-
remove_nil_values(
|
15
|
-
startX: bendpoint.x == 0 ? nil : bendpoint.x&.to_i,
|
16
|
-
startY: bendpoint.y == 0 ? nil : bendpoint.y&.to_i,
|
17
|
-
endX: bendpoint.end_x&.to_i,
|
18
|
-
endY: bendpoint.end_y&.to_i
|
19
|
-
)
|
20
|
-
)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require "ruby-enum"
|
3
|
-
|
4
|
-
module Archimate
|
5
|
-
module FileFormats
|
6
|
-
module Serializer
|
7
|
-
module Archi
|
8
|
-
class ViewpointType
|
9
|
-
include Ruby::Enum
|
10
|
-
|
11
|
-
define :None, ""
|
12
|
-
define :Actor_cooperation, "Actor Co-operation"
|
13
|
-
define :Application_behavior, "Application Behavior"
|
14
|
-
define :Application_cooperation, "Application Co-operation"
|
15
|
-
define :Application_structure, "Application Structure"
|
16
|
-
define :Application_usage, "Application Usage"
|
17
|
-
define :Business_function, "Business Function"
|
18
|
-
define :Business_process_cooperation, "Business Process Co-operation"
|
19
|
-
define :Business_process, "Business Process"
|
20
|
-
define :Product, "Product"
|
21
|
-
define :Implementation_and_deployment, "Implementation and Deployment"
|
22
|
-
define :Information_structure, "Information Structure"
|
23
|
-
define :Infrastructure_usage, "Infrastructure Usage"
|
24
|
-
define :Infrastructure, "Infrastructure"
|
25
|
-
define :Layered, "Layered"
|
26
|
-
define :Organization, "Organization"
|
27
|
-
define :Service_realization, "Service Realization"
|
28
|
-
define :Stakeholder, "Stakeholder"
|
29
|
-
define :Goal_realization, "Goal Realization"
|
30
|
-
define :Goal_contribution, "Goal Contribution"
|
31
|
-
define :Principles, "Principles"
|
32
|
-
define :Requirements_realization, "Requirements Realization"
|
33
|
-
define :Motivation, "Motivation"
|
34
|
-
define :Project, "Project"
|
35
|
-
define :Migration, "Migration"
|
36
|
-
define :Implementation_and_migration, "Implementation and Migration"
|
37
|
-
|
38
|
-
def self.[](idx)
|
39
|
-
values[idx]
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
data/lib/archimate/svg/child.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Archimate
|
4
|
-
module Svg
|
5
|
-
class Child
|
6
|
-
attr_reader :todos
|
7
|
-
attr_reader :child
|
8
|
-
|
9
|
-
def initialize(child)
|
10
|
-
@child = child
|
11
|
-
@todos = Hash.new(0)
|
12
|
-
end
|
13
|
-
|
14
|
-
# The info needed to render is contained in the child with the exception of
|
15
|
-
# any offset needed. So this will need to be included in the recursive drawing of children
|
16
|
-
def render_elements(svg)
|
17
|
-
Nokogiri::XML::Builder.with(svg) do |xml|
|
18
|
-
entity = EntityFactory.make_entity(child, nil)
|
19
|
-
if entity.nil?
|
20
|
-
puts "Unable to make an SVG Entity for Child:\n#{child}"
|
21
|
-
else
|
22
|
-
entity.to_svg(xml)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
svg
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|