archimate 1.2.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +47 -0
  3. data/TODOs.org +219 -0
  4. data/archimate.gemspec +2 -1
  5. data/exe/archidiff +7 -0
  6. data/exe/archidiff-summary +7 -0
  7. data/exe/archimerge +7 -0
  8. data/exe/fmtxml +7 -0
  9. data/lib/archimate.rb +10 -21
  10. data/lib/archimate/cli/archi.rb +2 -1
  11. data/lib/archimate/cli/cleanup.rb +8 -9
  12. data/lib/archimate/cli/convert.rb +3 -1
  13. data/lib/archimate/cli/mapper.rb +1 -1
  14. data/lib/archimate/cli/stats.rb +1 -1
  15. data/lib/archimate/config.rb +4 -1
  16. data/lib/archimate/data_model.rb +11 -24
  17. data/lib/archimate/data_model/any_attribute.rb +18 -5
  18. data/lib/archimate/data_model/any_element.rb +30 -7
  19. data/lib/archimate/data_model/bounds.rb +34 -7
  20. data/lib/archimate/data_model/color.rb +32 -7
  21. data/lib/archimate/data_model/comparison.rb +87 -0
  22. data/lib/archimate/data_model/concern.rb +20 -7
  23. data/lib/archimate/data_model/connection.rb +71 -51
  24. data/lib/archimate/data_model/connector_type.rb +23 -0
  25. data/lib/archimate/data_model/diagram.rb +72 -10
  26. data/lib/archimate/data_model/diagram_type.rb +17 -0
  27. data/lib/archimate/data_model/differentiable.rb +142 -0
  28. data/lib/archimate/data_model/element.rb +39 -45
  29. data/lib/archimate/data_model/element_type.rb +89 -0
  30. data/lib/archimate/data_model/font.rb +30 -12
  31. data/lib/archimate/data_model/lang_string.rb +89 -16
  32. data/lib/archimate/data_model/layer.rb +55 -0
  33. data/lib/archimate/data_model/layers.rb +62 -0
  34. data/lib/archimate/data_model/location.rb +27 -11
  35. data/lib/archimate/data_model/metadata.rb +10 -3
  36. data/lib/archimate/data_model/model.rb +188 -121
  37. data/lib/archimate/data_model/modeling_note.rb +14 -3
  38. data/lib/archimate/data_model/organization.rb +44 -13
  39. data/lib/archimate/data_model/{documentation.rb → preserved_lang_string.rb} +1 -5
  40. data/lib/archimate/data_model/property.rb +17 -11
  41. data/lib/archimate/data_model/property_definition.rb +34 -4
  42. data/lib/archimate/data_model/referenceable.rb +0 -9
  43. data/lib/archimate/data_model/referenceable_collection.rb +201 -0
  44. data/lib/archimate/data_model/relationship.rb +52 -33
  45. data/lib/archimate/data_model/relationship_type.rb +43 -0
  46. data/lib/archimate/data_model/schema_info.rb +17 -6
  47. data/lib/archimate/data_model/style.rb +41 -11
  48. data/lib/archimate/data_model/view_node.rb +153 -59
  49. data/lib/archimate/data_model/viewpoint.rb +56 -80
  50. data/lib/archimate/data_model/viewpoint_type.rb +429 -0
  51. data/lib/archimate/export/csv_export.rb +2 -2
  52. data/lib/archimate/export/cypher.rb +2 -2
  53. data/lib/archimate/export/graph_ml.rb +7 -5
  54. data/lib/archimate/export/jsonl.rb +166 -0
  55. data/lib/archimate/export/n_quads.rb +8 -5
  56. data/lib/archimate/file_format.rb +4 -5
  57. data/lib/archimate/file_formats/archi_file_reader.rb +7 -240
  58. data/lib/archimate/file_formats/archi_file_writer.rb +16 -188
  59. data/lib/archimate/file_formats/model_exchange_file_reader.rb +7 -225
  60. data/lib/archimate/file_formats/model_exchange_file_writer_21.rb +22 -114
  61. data/lib/archimate/file_formats/model_exchange_file_writer_30.rb +22 -122
  62. data/lib/archimate/file_formats/sax.rb +55 -0
  63. data/lib/archimate/file_formats/sax/any_element.rb +64 -0
  64. data/lib/archimate/file_formats/sax/archi/archi_handler_factory.rb +48 -0
  65. data/lib/archimate/file_formats/sax/archi/bounds.rb +25 -0
  66. data/lib/archimate/file_formats/sax/archi/connection.rb +47 -0
  67. data/lib/archimate/file_formats/sax/archi/content.rb +28 -0
  68. data/lib/archimate/file_formats/sax/archi/diagram.rb +66 -0
  69. data/lib/archimate/file_formats/sax/archi/element.rb +36 -0
  70. data/lib/archimate/file_formats/sax/archi/location.rb +25 -0
  71. data/lib/archimate/file_formats/sax/archi/model.rb +109 -0
  72. data/lib/archimate/file_formats/sax/archi/organization.rb +60 -0
  73. data/lib/archimate/file_formats/sax/archi/property.rb +54 -0
  74. data/lib/archimate/file_formats/sax/archi/relationship.rb +50 -0
  75. data/lib/archimate/file_formats/sax/archi/style.rb +35 -0
  76. data/lib/archimate/file_formats/sax/archi/view_node.rb +76 -0
  77. data/lib/archimate/file_formats/sax/capture_content.rb +20 -0
  78. data/lib/archimate/file_formats/sax/capture_documentation.rb +19 -0
  79. data/lib/archimate/file_formats/sax/capture_properties.rb +20 -0
  80. data/lib/archimate/file_formats/sax/content_element.rb +19 -0
  81. data/lib/archimate/file_formats/sax/document.rb +80 -0
  82. data/lib/archimate/file_formats/sax/handler.rb +54 -0
  83. data/lib/archimate/file_formats/sax/lang_string.rb +28 -0
  84. data/lib/archimate/file_formats/sax/model_exchange_file/color.rb +36 -0
  85. data/lib/archimate/file_formats/sax/model_exchange_file/connection.rb +67 -0
  86. data/lib/archimate/file_formats/sax/model_exchange_file/diagram.rb +60 -0
  87. data/lib/archimate/file_formats/sax/model_exchange_file/element.rb +43 -0
  88. data/lib/archimate/file_formats/sax/model_exchange_file/font.rb +44 -0
  89. data/lib/archimate/file_formats/sax/model_exchange_file/item.rb +64 -0
  90. data/lib/archimate/file_formats/sax/model_exchange_file/location.rb +23 -0
  91. data/lib/archimate/file_formats/sax/model_exchange_file/metadata.rb +66 -0
  92. data/lib/archimate/file_formats/sax/model_exchange_file/model.rb +124 -0
  93. data/lib/archimate/file_formats/sax/model_exchange_file/model_exchange_handler_factory.rb +53 -0
  94. data/lib/archimate/file_formats/sax/model_exchange_file/property.rb +32 -0
  95. data/lib/archimate/file_formats/sax/model_exchange_file/property_definition.rb +36 -0
  96. data/lib/archimate/file_formats/sax/model_exchange_file/relationship.rb +49 -0
  97. data/lib/archimate/file_formats/sax/model_exchange_file/schema_info.rb +47 -0
  98. data/lib/archimate/file_formats/sax/model_exchange_file/style.rb +66 -0
  99. data/lib/archimate/file_formats/sax/model_exchange_file/view_node.rb +86 -0
  100. data/lib/archimate/file_formats/sax/no_op.rb +17 -0
  101. data/lib/archimate/file_formats/sax/preserved_lang_string.rb +28 -0
  102. data/lib/archimate/file_formats/serializer.rb +57 -0
  103. data/lib/archimate/file_formats/serializer/archi/bounds.rb +23 -0
  104. data/lib/archimate/file_formats/serializer/archi/connection.rb +33 -0
  105. data/lib/archimate/file_formats/serializer/archi/diagram.rb +28 -0
  106. data/lib/archimate/file_formats/serializer/archi/documentation.rb +16 -0
  107. data/lib/archimate/file_formats/serializer/archi/element.rb +24 -0
  108. data/lib/archimate/file_formats/serializer/archi/location.rb +26 -0
  109. data/lib/archimate/file_formats/serializer/archi/model.rb +25 -0
  110. data/lib/archimate/file_formats/serializer/archi/organization.rb +21 -0
  111. data/lib/archimate/file_formats/serializer/archi/property.rb +15 -0
  112. data/lib/archimate/file_formats/serializer/archi/relationship.rb +36 -0
  113. data/lib/archimate/file_formats/serializer/archi/view_node.rb +52 -0
  114. data/lib/archimate/file_formats/serializer/archi/viewpoint_type.rb +45 -0
  115. data/lib/archimate/file_formats/serializer/model_exchange_file/element.rb +25 -0
  116. data/lib/archimate/file_formats/serializer/model_exchange_file/location.rb +15 -0
  117. data/lib/archimate/file_formats/serializer/model_exchange_file/model_exchange_file_writer.rb +32 -0
  118. data/lib/archimate/file_formats/serializer/model_exchange_file/organization.rb +23 -0
  119. data/lib/archimate/file_formats/serializer/model_exchange_file/properties.rb +15 -0
  120. data/lib/archimate/file_formats/serializer/model_exchange_file/relationship.rb +19 -0
  121. data/lib/archimate/file_formats/serializer/model_exchange_file/style.rb +48 -0
  122. data/lib/archimate/file_formats/serializer/model_exchange_file/v21/connection.rb +25 -0
  123. data/lib/archimate/file_formats/serializer/model_exchange_file/v21/diagram.rb +27 -0
  124. data/lib/archimate/file_formats/serializer/model_exchange_file/v21/item.rb +17 -0
  125. data/lib/archimate/file_formats/serializer/model_exchange_file/v21/label.rb +17 -0
  126. data/lib/archimate/file_formats/serializer/model_exchange_file/v21/model.rb +36 -0
  127. data/lib/archimate/file_formats/serializer/model_exchange_file/v21/organization_body.rb +25 -0
  128. data/lib/archimate/file_formats/serializer/model_exchange_file/v21/property.rb +19 -0
  129. data/lib/archimate/file_formats/serializer/model_exchange_file/v21/view_node.rb +44 -0
  130. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/connection.rb +26 -0
  131. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/diagram.rb +27 -0
  132. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/item.rb +17 -0
  133. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/label.rb +17 -0
  134. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/model.rb +41 -0
  135. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/organization_body.rb +25 -0
  136. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/property.rb +19 -0
  137. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/property_definitions.rb +34 -0
  138. data/lib/archimate/file_formats/serializer/model_exchange_file/v30/view_node.rb +45 -0
  139. data/lib/archimate/file_formats/serializer/named_collection.rb +21 -0
  140. data/lib/archimate/file_formats/serializer/writer.rb +56 -0
  141. data/lib/archimate/file_formats/serializer/xml_lang_string.rb +30 -0
  142. data/lib/archimate/file_formats/serializer/xml_metadata.rb +64 -0
  143. data/lib/archimate/file_formats/{model_exchange_file → serializer}/xml_property_defs.rb +2 -2
  144. data/lib/archimate/lint/duplicate_entities.rb +3 -3
  145. data/lib/archimate/lint/linter.rb +24 -29
  146. data/lib/archimate/svg/connection.rb +13 -103
  147. data/lib/archimate/svg/diagram.rb +1 -1
  148. data/lib/archimate/svg/entity/base_entity.rb +12 -8
  149. data/lib/archimate/svg/entity/data_entity.rb +2 -2
  150. data/lib/archimate/svg/entity/diagram_model_reference.rb +1 -1
  151. data/lib/archimate/svg/entity/event_entity.rb +2 -2
  152. data/lib/archimate/svg/entity/gap.rb +1 -1
  153. data/lib/archimate/svg/entity/group.rb +1 -1
  154. data/lib/archimate/svg/entity/motivation_entity.rb +1 -1
  155. data/lib/archimate/svg/entity/node.rb +1 -1
  156. data/lib/archimate/svg/entity/rect_entity.rb +1 -1
  157. data/lib/archimate/svg/entity/rounded_rect_entity.rb +1 -1
  158. data/lib/archimate/svg/entity/service_entity.rb +2 -2
  159. data/lib/archimate/svg/entity/value.rb +2 -2
  160. data/lib/archimate/svg/path.rb +153 -0
  161. data/lib/archimate/svg/point.rb +8 -1
  162. data/lib/archimate/version.rb +1 -1
  163. metadata +118 -36
  164. data/lib/archimate/data_model/archimate_node.rb +0 -181
  165. data/lib/archimate/data_model/concept.rb +0 -14
  166. data/lib/archimate/data_model/constants.rb +0 -82
  167. data/lib/archimate/data_model/container.rb +0 -17
  168. data/lib/archimate/data_model/diffable_array.rb +0 -213
  169. data/lib/archimate/data_model/diffable_primitive.rb +0 -83
  170. data/lib/archimate/data_model/label.rb +0 -19
  171. data/lib/archimate/data_model/named_referenceable.rb +0 -14
  172. data/lib/archimate/data_model/view.rb +0 -12
  173. data/lib/archimate/data_model/view_concept.rb +0 -18
  174. data/lib/archimate/file_formats/archi_file_format.rb +0 -151
  175. data/lib/archimate/file_formats/archimate_v2.rb +0 -461
  176. data/lib/archimate/file_formats/model_exchange_file/xml_lang_string.rb +0 -35
  177. data/lib/archimate/file_formats/model_exchange_file/xml_metadata.rb +0 -115
  178. data/lib/archimate/file_formats/model_exchange_file/xml_property_definitions.rb +0 -28
  179. data/lib/archimate/file_formats/model_exchange_file_reader_21.rb +0 -73
  180. data/lib/archimate/file_formats/model_exchange_file_reader_30.rb +0 -134
  181. data/lib/archimate/file_formats/model_exchange_file_writer.rb +0 -157
  182. data/lib/archimate/file_formats/writer.rb +0 -56
@@ -1,83 +0,0 @@
1
- # frozen_string_literal: true
2
- module Archimate
3
- module DataModel
4
- module DiffablePrimitive
5
- module DiffablePrimitiveMethods
6
- def diff(other, from_parent, to_parent, attribute, from_attribute = nil)
7
- from_attribute = attribute if from_attribute.nil?
8
- if other.nil?
9
- return [Diff::Delete.new(
10
- Diff::ArchimateNodeAttributeReference.new(from_parent, attribute)
11
- )]
12
- end
13
- raise TypeError, "Expected other #{other.class} to be of type #{self.class}" unless other.is_a?(self.class)
14
- unless self == other
15
- return [Diff::Change.new(
16
- Diff::ArchimateNodeReference.for_node(to_parent, attribute),
17
- Diff::ArchimateNodeReference.for_node(from_parent, from_attribute)
18
- )]
19
- end
20
- []
21
- end
22
-
23
- def in_model=(_m); end
24
-
25
- def parent=(_p); end
26
-
27
- def parent_attribute_name=(_attr_name); end
28
-
29
- def build_index(index_hash)
30
- index_hash
31
- end
32
-
33
- def primitive?
34
- true
35
- end
36
-
37
- def id
38
- object_id.to_s
39
- end
40
-
41
- def clone
42
- self
43
- end
44
-
45
- def dup
46
- self
47
- end
48
-
49
- def compact!
50
- self
51
- end
52
-
53
- def referenced_identified_nodes
54
- []
55
- end
56
- end
57
-
58
- refine Symbol do
59
- include DiffablePrimitiveMethods
60
- end
61
-
62
- refine String do
63
- include DiffablePrimitiveMethods
64
- end
65
-
66
- refine Hash do
67
- include DiffablePrimitiveMethods
68
- end
69
-
70
- refine Integer do
71
- include DiffablePrimitiveMethods
72
- end
73
-
74
- refine Float do
75
- include DiffablePrimitiveMethods
76
- end
77
-
78
- refine NilClass do
79
- include DiffablePrimitiveMethods
80
- end
81
- end
82
- end
83
- end
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Archimate
4
- module DataModel
5
- # Node type to allow a Label in a Artifact. the "label" element holds the info for the Note.
6
- class Label < ViewNode
7
- # conceptRef is a reference to an concept for this particular label, along with the attributeRef
8
- # which references the particular concept's part which this label represents.
9
- attribute :concept_ref, Identifier
10
- # conceptRef is a reference to an concept for this particular label, along with the partRef
11
- # which references the particular concept's part which this label represents. If this attribute
12
- # is set, then there is no need to add a label tag in the Label parent (since it is contained in the model).
13
- # the XPATH statement is meant to be interpreted in the context of what the conceptRef points to.
14
- attribute :xpath_path, Strict::String.optional
15
- end
16
-
17
- Dry::Types.register_class(Label)
18
- end
19
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Archimate
4
- module DataModel
5
- class NamedReferenceable < Referenceable
6
- # Note: minimum 1 name is required for a Named Referenceable
7
- # attribute :name, Strict::Array.member(LangString).default([]) .constrained(min_size: 1)
8
- # attribute :documentation, DocumentationGroup
9
- # attribute :grp_any, Strict::Array.member(AnyGroup).default([])
10
- end
11
-
12
- Dry::Types.register_class(NamedReferenceable)
13
- end
14
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Archimate
4
- module DataModel
5
- # This is a container for all of the Views in the model.
6
- class View < NamedReferenceable
7
- attribute :properties, PropertiesList
8
- attribute :viewpoint_type, Strict::String.optional # TODO: ViewpointType.optional is better, but is ArchiMate version dependent. Need to figure that out
9
- attribute :viewpoint, Viewpoint.optional
10
- end
11
- end
12
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Archimate
4
- module DataModel
5
- # This is an abstract super-type of Node and Connection.
6
- class ViewConcept < ArchimateNode
7
- attribute :id, Identifier
8
- attribute :labels, Strict::Array.member(LangString).constrained(min_size: 1)
9
- attribute :documentation, DocumentationGroup
10
- attribute :style, Style.optional
11
- # the "viewRef" of an "Concept" is to a view that allows drill-down diagrams.
12
- attribute :view_refs, Strict::Array.member(Identifier)
13
- # TODO: any other attributes
14
- end
15
-
16
- Dry::Types.register_class(ViewConcept)
17
- end
18
- end
@@ -1,151 +0,0 @@
1
- # frozen_string_literal: true
2
- module Archimate
3
- module FileFormats
4
- module ArchiFileFormat
5
- # strategy_folder_xpath = "/archimate:model/folder[@type='strategy']"
6
- application_folder_xpath = "/archimate:model/folder[@type='application']"
7
- business_folder_xpath = "/archimate:model/folder[@type='business']"
8
- technology_folder_xpath = "/archimate:model/folder[@type='technology']"
9
- # physical_folder_xpath = "/archimate:model/folder[@type='physical']"
10
- motivation_folder_xpath = "/archimate:model/folder[@type='motivation']"
11
- implementation_migration_folder_xpath = "/archimate:model/folder[@type='implementation_migration']"
12
- connectors_folder_xpath = "/archimate:model/folder[@type='connectors']"
13
- relations_folder_xpath = "/archimate:model/folder[@type='relations']"
14
- diagrams_folder_xpath = "/archimate:model/folder[@type='diagrams']"
15
-
16
- ELEMENT_TYPE_TO_PARENT_XPATH = {
17
- "archimate:BusinessActor" => business_folder_xpath,
18
- "archimate:BusinessCollaboration" => business_folder_xpath,
19
- "archimate:BusinessEvent" => business_folder_xpath,
20
- "archimate:BusinessFunction" => business_folder_xpath,
21
- "archimate:BusinessInteraction" => business_folder_xpath,
22
- "archimate:BusinessInterface" => business_folder_xpath,
23
- "archimate:BusinessObject" => business_folder_xpath,
24
- "archimate:BusinessProcess" => business_folder_xpath,
25
- "archimate:BusinessRole" => business_folder_xpath,
26
- "archimate:BusinessService" => business_folder_xpath,
27
- "archimate:Contract" => business_folder_xpath,
28
- "archimate:Location" => business_folder_xpath,
29
- "archimate:Meaning" => business_folder_xpath,
30
- "archimate:Value" => business_folder_xpath,
31
- "archimate:Product" => business_folder_xpath,
32
- "archimate:Representation" => business_folder_xpath,
33
-
34
- "archimate:ApplicationCollaboration" => application_folder_xpath,
35
- "archimate:ApplicationComponent" => application_folder_xpath,
36
- "archimate:ApplicationFunction" => application_folder_xpath,
37
- "archimate:ApplicationInteraction" => application_folder_xpath,
38
- "archimate:ApplicationInterface" => application_folder_xpath,
39
- "archimate:ApplicationService" => application_folder_xpath,
40
- "archimate:DataObject" => application_folder_xpath,
41
-
42
- "archimate:Artifact" => technology_folder_xpath,
43
- "archimate:CommunicationPath" => technology_folder_xpath,
44
- "archimate:Device" => technology_folder_xpath,
45
- "archimate:InfrastructureFunction" => technology_folder_xpath,
46
- "archimate:InfrastructureInterface" => technology_folder_xpath,
47
- "archimate:InfrastructureService" => technology_folder_xpath,
48
- "archimate:Network" => technology_folder_xpath,
49
- "archimate:Node" => technology_folder_xpath,
50
- "archimate:SystemSoftware" => technology_folder_xpath,
51
-
52
- "archimate:Assessment" => motivation_folder_xpath,
53
- "archimate:Constraint" => motivation_folder_xpath,
54
- "archimate:Driver" => motivation_folder_xpath,
55
- "archimate:Goal" => motivation_folder_xpath,
56
- "archimate:Principle" => motivation_folder_xpath,
57
- "archimate:Requirement" => motivation_folder_xpath,
58
- "archimate:Stakeholder" => motivation_folder_xpath,
59
-
60
- "archimate:Deliverable" => implementation_migration_folder_xpath,
61
- "archimate:Gap" => implementation_migration_folder_xpath,
62
- "archimate:Plateau" => implementation_migration_folder_xpath,
63
- "archimate:WorkPackage" => implementation_migration_folder_xpath,
64
-
65
- "archimate:AndJunction" => connectors_folder_xpath,
66
- "archimate:Junction" => connectors_folder_xpath,
67
- "archimate:OrJunction" => connectors_folder_xpath,
68
-
69
- "archimate:AccessRelationship" => relations_folder_xpath,
70
- "archimate:AggregationRelationship" => relations_folder_xpath,
71
- "archimate:AssignmentRelationship" => relations_folder_xpath,
72
- "archimate:AssociationRelationship" => relations_folder_xpath,
73
- "archimate:CompositionRelationship" => relations_folder_xpath,
74
- "archimate:FlowRelationship" => relations_folder_xpath,
75
- "archimate:InfluenceRelationship" => relations_folder_xpath,
76
- "archimate:RealisationRelationship" => relations_folder_xpath,
77
- "archimate:SpecialisationRelationship" => relations_folder_xpath,
78
- "archimate:TriggeringRelationship" => relations_folder_xpath,
79
- "archimate:UsedByRelationship" => relations_folder_xpath,
80
-
81
- "archimate:SketchModel" => diagrams_folder_xpath,
82
- "archimate:ArchimateDiagramModel" => diagrams_folder_xpath
83
- }.freeze
84
-
85
- FOLDER_XPATHS = [
86
- "folder[type=\"strategy\"]",
87
- "folder[type=\"business\"]",
88
- "folder[type=\"application\"]",
89
- "folder[type=\"technology\"]",
90
- "folder[type=\"physical\"]",
91
- "folder[type=\"motivation\"]",
92
- "folder[type=\"implementation_migration\"]",
93
- "folder[type=\"other\"]",
94
- "folder[type=\"connectors\"]"
95
- ].freeze
96
-
97
- ELEMENT_FOLDER_TYPES = %w(
98
- strategy
99
- business
100
- application
101
- technology
102
- physical
103
- motivation
104
- implementation_migration
105
- connectors
106
- ).freeze
107
-
108
- RELATION_XPATHS = [
109
- "folder[type=\"relations\"]",
110
- "folder[type=\"derived\"]"
111
- ].freeze
112
-
113
- RELATION_FOLDER_TYPES = %w(relations derived).freeze
114
-
115
- DIAGRAM_XPATHS = [
116
- "folder[type=\"diagrams\"]"
117
- ].freeze
118
-
119
- DIAGRAM_FOLDER_TYPES = %w(diagrams).freeze
120
-
121
- VIEWPOINTS = [
122
- "",
123
- "Actor Co-operation",
124
- "Application Behavior",
125
- "Application Co-operation",
126
- "Application Structure",
127
- "Application Usage",
128
- "Business Function",
129
- "Business Process Co-operation",
130
- "Business Process",
131
- "Product",
132
- "Implementation and Deployment",
133
- "Information Structure",
134
- "Infrastructure Usage",
135
- "Infrastructure",
136
- "Layered",
137
- "Organization",
138
- "Service Realization",
139
- "Stakeholder",
140
- "Goal Realization",
141
- "Goal Contribution",
142
- "Principles",
143
- "Requirements Realization",
144
- "Motivation",
145
- "Project",
146
- "Migration",
147
- "Implementation and Migration"
148
- ].freeze
149
- end
150
- end
151
- end
@@ -1,461 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Archimate
4
- module FileFormats
5
- module ArchimateV2
6
- LAYER_ENTITIES = {
7
- "Business" => %w[
8
- BusinessActor
9
- BusinessCollaboration
10
- BusinessEvent
11
- BusinessFunction
12
- BusinessInteraction
13
- BusinessInterface
14
- BusinessObject
15
- BusinessProcess
16
- BusinessRole
17
- BusinessService
18
- Contract
19
- Location
20
- Meaning
21
- Value
22
- Product
23
- Representation
24
- ].freeze,
25
- "Application" => %w[
26
- ApplicationCollaboration
27
- ApplicationComponent
28
- ApplicationFunction
29
- ApplicationInteraction
30
- ApplicationInterface
31
- ApplicationService
32
- DataObject
33
- ].freeze,
34
- "Technology" => %w[
35
- Artifact
36
- CommunicationPath
37
- Device
38
- InfrastructureFunction
39
- InfrastructureInterface
40
- InfrastructureService
41
- Network
42
- Node
43
- SystemSoftware
44
- ].freeze,
45
- "Motivation" => %w[
46
- Assessment
47
- Constraint
48
- Driver
49
- Goal
50
- Principle
51
- Requirement
52
- Stakeholder
53
- ].freeze,
54
- "Implementation and Migration" => %w[
55
- Deliverable
56
- Gap
57
- Plateau
58
- WorkPackage
59
- ].freeze
60
- }.freeze
61
-
62
- ENTITIES = LAYER_ENTITIES.values.flatten.freeze
63
-
64
- CORE_ELEMENTS = %w[Business Application Technology]
65
- .map { |layer| LAYER_ENTITIES[layer] }
66
- .inject([]) { |memo, obj| memo.concat(obj) }
67
-
68
- CONNECTORS = %w[
69
- AndJunction
70
- Junction
71
- OrJunction
72
- ].freeze
73
-
74
- RELATIONS = %w[
75
- AccessRelationship
76
- AggregationRelationship
77
- AssignmentRelationship
78
- AssociationRelationship
79
- CompositionRelationship
80
- FlowRelationship
81
- InfluenceRelationship
82
- RealisationRelationship
83
- SpecialisationRelationship
84
- TriggeringRelationship
85
- UsedByRelationship
86
- ].freeze
87
-
88
- DEFAULT_RELATIONS = %w[
89
- AccessRelationship
90
- AggregationRelationship
91
- AssignmentRelationship
92
- AssociationRelationship
93
- CompositionRelationship
94
- FlowRelationship
95
- RealisationRelationship
96
- SpecialisationRelationship
97
- TriggeringRelationship
98
- UsedByRelationship
99
- ].freeze
100
-
101
- RELATION_VERBS = {
102
- "AccessRelationship" => "accesses",
103
- "AggregationRelationship" => "aggregates",
104
- "AssignmentRelationship" => "is assigned to",
105
- "AssociationRelationship" => "is associated with",
106
- "CompositionRelationship" => "composes",
107
- "FlowRelationship" => "flows to",
108
- "InfluenceRelationship" => "influenecs",
109
- "RealisationRelationship" => "realizes",
110
- "SpecialisationRelationship" => "specializes",
111
- "TriggeringRelationship" => "triggers",
112
- "UsedByRelationship" => "is used by"
113
- }.freeze
114
-
115
- VIEWPOINTS = {
116
- "Introductory" => { entities: CORE_ELEMENTS, relations: RELATIONS },
117
- "Organization" => {
118
- entities: CONNECTORS + %w[
119
- BusinessActor
120
- BusinessCollaboration
121
- BusinessInterface
122
- BusinessRole
123
- Location
124
- ],
125
- relations: DEFAULT_RELATIONS - %w[AccessRelationship RealisationRelationship]
126
- },
127
- "Actor Co-operation" => {
128
- entities: CONNECTORS + %w[
129
- ApplicationComponent
130
- ApplicationInterface
131
- ApplicationService
132
- BusinessActor
133
- BusinessCollaboration
134
- BusinessInterface
135
- BusinessRole
136
- BusinessService
137
- ],
138
- relations: DEFAULT_RELATIONS - %w[AccessRelationship]
139
- },
140
- "Business Function" => {
141
- entities: CONNECTORS + %w[
142
- BusinessActor
143
- BusinessFunction
144
- BusinessRole
145
- ],
146
- relations: DEFAULT_RELATIONS - %w[AccessRelationship RealisationRelationship]
147
- },
148
- "Business Process" => {
149
- entities: CONNECTORS + %w[
150
- ApplicationService
151
- BusinessActor
152
- BusinessCollaboration
153
- BusinessEvent
154
- BusinessFunction
155
- BusinessInteraction
156
- BusinessObject
157
- BusinessProcess
158
- BusinessRole
159
- BusinessService
160
- Location
161
- Representation
162
- ],
163
- relations: DEFAULT_RELATIONS
164
- },
165
- "Business Process Co-operation" => {
166
- entities: CONNECTORS + %w[
167
- ApplicationService
168
- BusinessActor
169
- BusinessCollaboration
170
- BusinessEvent
171
- BusinessFunction
172
- BusinessInteraction
173
- BusinessObject
174
- BusinessProcess
175
- BusinessRole
176
- BusinessService
177
- Location
178
- Representation
179
- ],
180
- relations: DEFAULT_RELATIONS
181
- },
182
- "Product" => {
183
- entities: CONNECTORS + %w[
184
- ApplicationComponent
185
- ApplicationInterface
186
- ApplicationService
187
- BusinessActor
188
- BusinessEvent
189
- BusinessFunction
190
- BusinessInteraction
191
- BusinessInterface
192
- BusinessProcess
193
- BusinessRole
194
- BusinessService
195
- Contract
196
- Product
197
- Value
198
- ],
199
- relations: DEFAULT_RELATIONS
200
- },
201
- "Application Behavior" => {
202
- entities: CONNECTORS + %w[
203
- ApplicationCollaboration
204
- ApplicationComponent
205
- ApplicationFunction
206
- ApplicationInteraction
207
- ApplicationInterface
208
- ApplicationService
209
- DataObject
210
- ],
211
- relations: DEFAULT_RELATIONS
212
- },
213
- "Application Co-operation" => {
214
- entities: CONNECTORS + %w[
215
- ApplicationCollaboration
216
- ApplicationComponent
217
- ApplicationFunction
218
- ApplicationInteraction
219
- ApplicationInterface
220
- ApplicationService
221
- DataObject
222
- Location
223
- ],
224
- relations: DEFAULT_RELATIONS
225
- },
226
- "Application Structure" => {
227
- entities: CONNECTORS + %w[
228
- ApplicationCollaboration
229
- ApplicationComponent
230
- ApplicationInterface
231
- DataObject
232
- ],
233
- relations: DEFAULT_RELATIONS - %w[RealisationRelationship]
234
- },
235
- "Application Usage" => {
236
- entities: CONNECTORS + %w[
237
- ApplicationCollaboration
238
- ApplicationComponent
239
- ApplicationInterface
240
- ApplicationService
241
- BusinessEvent
242
- BusinessFunction
243
- BusinessInteraction
244
- BusinessObject
245
- BusinessProcess
246
- BusinessRole
247
- DataObject
248
- ],
249
- relations: DEFAULT_RELATIONS
250
- },
251
- "Infrastructure" => {
252
- entities: CONNECTORS + %w[
253
- Artifact
254
- CommunicationPath
255
- Device
256
- InfrastructureFunction
257
- InfrastructureInterface
258
- InfrastructureService
259
- Location
260
- Network
261
- Node
262
- SystemSoftware
263
- ],
264
- relations: DEFAULT_RELATIONS
265
- },
266
- "Infrastructure Usage" => {
267
- entities: CONNECTORS + %w[
268
- ApplicationComponent
269
- ApplicationFunction
270
- CommunicationPath
271
- Device
272
- InfrastructureFunction
273
- InfrastructureInterface
274
- InfrastructureService
275
- Network
276
- Node
277
- SystemSoftware
278
- ],
279
- relations: DEFAULT_RELATIONS
280
- },
281
- "Implementation and Deployment" => {
282
- entities: CONNECTORS + %w[
283
- ApplicationCollaboration
284
- ApplicationComponent
285
- Artifact
286
- CommunicationPath
287
- DataObject
288
- Device
289
- InfrastructureService
290
- Network
291
- Node
292
- SystemSoftware
293
- ],
294
- relations: DEFAULT_RELATIONS
295
- },
296
- "Information Structure" => {
297
- entities: CONNECTORS + %w[
298
- Artifact
299
- BusinessObject
300
- DataObject
301
- Meaning
302
- Representation
303
- ],
304
- relations: DEFAULT_RELATIONS - %w[AssignmentRelationship UsedByRelationship]
305
- },
306
- "Service Realization" => {
307
- entities: CONNECTORS + %w[
308
- ApplicationCollaboration
309
- ApplicationComponent
310
- ApplicationService
311
- BusinessActor
312
- BusinessCollaboration
313
- BusinessEvent
314
- BusinessFunction
315
- BusinessInteraction
316
- BusinessObject
317
- BusinessProcess
318
- BusinessRole
319
- BusinessService
320
- DataObject
321
- ],
322
- relations: DEFAULT_RELATIONS
323
- },
324
- "Layered" => {
325
- entities: ENTITIES + CONNECTORS,
326
- relations: RELATIONS
327
- },
328
- "Landscape Map" => {
329
- entities: ENTITIES + CONNECTORS,
330
- relations: RELATIONS
331
- },
332
- "Stakeholder" => {
333
- entities: %w[
334
- Assessment
335
- Driver
336
- Goal
337
- Stakeholder
338
- ],
339
- relations: %w[
340
- AggregationRelationship
341
- AssociationRelationship
342
- CompositionRelationship
343
- InfluenceRelationship
344
- SpecialisationRelationship
345
- ]
346
- },
347
- "Goal Realization" => {
348
- entities: %w[
349
- Constraint
350
- Goal
351
- Principle
352
- Requirement
353
- ],
354
- relations: %w[
355
- AggregationRelationship
356
- AssociationRelationship
357
- CompositionRelationship
358
- InfluenceRelationship
359
- RealisationRelationship
360
- SpecialisationRelationship
361
- ]
362
- },
363
- "Goal Contribution" => {
364
- entities: %w[
365
- Constraint
366
- Goal
367
- Principle
368
- Requirement
369
- ],
370
- relations: %w[
371
- AggregationRelationship
372
- AssociationRelationship
373
- CompositionRelationship
374
- InfluenceRelationship
375
- RealisationRelationship
376
- SpecialisationRelationship
377
- ]
378
- },
379
- "Principles" => {
380
- entities: %w[
381
- Goal
382
- Principle
383
- ],
384
- relations: %w[
385
- AggregationRelationship
386
- AssociationRelationship
387
- CompositionRelationship
388
- InfluenceRelationship
389
- RealisationRelationship
390
- SpecialisationRelationship
391
- ]
392
- },
393
- "Requirements Realization" => {
394
- entities: CORE_ELEMENTS + CONNECTORS + %w[
395
- Constraint
396
- Goal
397
- Requirement
398
- ],
399
- relations: DEFAULT_RELATIONS
400
- },
401
- "Motivation" => {
402
- entities: %w[
403
- Assessment
404
- Constraint
405
- Driver
406
- Goal
407
- Principle
408
- Requirement
409
- Stakeholder
410
- ],
411
- relations: %w[
412
- AggregationRelationship
413
- AssociationRelationship
414
- CompositionRelationship
415
- FlowRelationship
416
- InfluenceRelationship
417
- RealisationRelationship
418
- SpecialisationRelationship
419
- ]
420
- },
421
- "Project" => {
422
- entities: CONNECTORS + %w[
423
- BusinessActor
424
- BusinessRole
425
- Deliverable
426
- Goal
427
- WorkPackage
428
- ],
429
- relations: DEFAULT_RELATIONS - %w[AccessRelationship]
430
- },
431
- "Migration" => {
432
- entities: CONNECTORS + %w[Gap Plateau],
433
- relations: %w[
434
- AndJunction
435
- AssociationRelationship
436
- CompositionRelationship
437
- FlowRelationship
438
- Junction
439
- OrJunction
440
- TriggeringRelationship
441
- ]
442
- },
443
- "Implementation and Migration" => {
444
- entities: CORE_ELEMENTS + CONNECTORS + %w[
445
- Location
446
- Requirement
447
- Constraint
448
- Goal
449
- BusinessRole
450
- WorkPackage
451
- Deliverable
452
- BusinessActor
453
- Plateau
454
- Gap
455
- ],
456
- relations: DEFAULT_RELATIONS
457
- }
458
- }.freeze
459
- end
460
- end
461
- end