@linked.archi/kernel 0.0.0-stage → 0.1.6

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.
Files changed (366) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +11 -0
  3. package/README.md +102 -2
  4. package/assets/arch-decision/arch-decision-metamodel.ttl +44 -0
  5. package/assets/arch-decision/arch-decision-onto.ttl +1566 -0
  6. package/assets/arch-decision/arch-decision-shapes.ttl +582 -0
  7. package/assets/arch-decision/arch-decision-tax.ttl +129 -0
  8. package/assets/arch-processes/arch-processes-metamodel.ttl +42 -0
  9. package/assets/arch-processes/arch-processes-tax.ttl +136 -0
  10. package/assets/arch-processes/archProcesses-shapes.ttl +189 -0
  11. package/assets/arch-processes/archProcesses.ttl +953 -0
  12. package/assets/archimate3/archimate3.2-element-shapes.ttl +379 -0
  13. package/assets/archimate3/archimate3.2-metamodel.ttl +205 -0
  14. package/assets/archimate3/archimate3.2-notation.ttl +1503 -0
  15. package/assets/archimate3/archimate3.2-onto.ttl +1579 -0
  16. package/assets/archimate3/archimate3.2-presentation-contexts.ttl +90 -0
  17. package/assets/archimate3/archimate3.2-principle-shapes.ttl +917 -0
  18. package/assets/archimate3/archimate3.2-questions.ttl +1125 -0
  19. package/assets/archimate3/archimate3.2-reference-data.ttl +74 -0
  20. package/assets/archimate3/archimate3.2-relationship-shapes.ttl +30956 -0
  21. package/assets/archimate3/archimate3.2-relationship-tables.ttl +5992 -0
  22. package/assets/archimate3/archimate3.2-tax.ttl +724 -0
  23. package/assets/archimate3/archimate3.2-viewpoint-shapes.ttl +59 -0
  24. package/assets/archimate3/archimate3.2-viewpoints.ttl +793 -0
  25. package/assets/archimate3/icons/and-junction.svg +3 -0
  26. package/assets/archimate3/icons/application-collaboration.svg +22 -0
  27. package/assets/archimate3/icons/application-component.svg +18 -0
  28. package/assets/archimate3/icons/application-event.svg +15 -0
  29. package/assets/archimate3/icons/application-function.svg +14 -0
  30. package/assets/archimate3/icons/application-interaction.svg +17 -0
  31. package/assets/archimate3/icons/application-interface.svg +16 -0
  32. package/assets/archimate3/icons/application-process.svg +14 -0
  33. package/assets/archimate3/icons/application-service.svg +14 -0
  34. package/assets/archimate3/icons/artifact.svg +16 -0
  35. package/assets/archimate3/icons/assessment.svg +17 -0
  36. package/assets/archimate3/icons/business-actor.svg +22 -0
  37. package/assets/archimate3/icons/business-collaboration.svg +21 -0
  38. package/assets/archimate3/icons/business-event.svg +15 -0
  39. package/assets/archimate3/icons/business-function.svg +14 -0
  40. package/assets/archimate3/icons/business-interaction.svg +18 -0
  41. package/assets/archimate3/icons/business-interface.svg +16 -0
  42. package/assets/archimate3/icons/business-object.svg +14 -0
  43. package/assets/archimate3/icons/business-process.svg +15 -0
  44. package/assets/archimate3/icons/business-role.svg +16 -0
  45. package/assets/archimate3/icons/business-service.svg +14 -0
  46. package/assets/archimate3/icons/capability.svg +40 -0
  47. package/assets/archimate3/icons/communication-network.svg +18 -0
  48. package/assets/archimate3/icons/constraint.svg +18 -0
  49. package/assets/archimate3/icons/contract.svg +13 -0
  50. package/assets/archimate3/icons/course-of-action.svg +20 -0
  51. package/assets/archimate3/icons/data-object.svg +14 -0
  52. package/assets/archimate3/icons/deliverable.svg +11 -0
  53. package/assets/archimate3/icons/device.svg +18 -0
  54. package/assets/archimate3/icons/distribution-network.svg +19 -0
  55. package/assets/archimate3/icons/driver.svg +24 -0
  56. package/assets/archimate3/icons/equipment.svg +31 -0
  57. package/assets/archimate3/icons/facility.svg +16 -0
  58. package/assets/archimate3/icons/gap.svg +22 -0
  59. package/assets/archimate3/icons/glyphs/activity.svg +3 -0
  60. package/assets/archimate3/icons/glyphs/actor.svg +14 -0
  61. package/assets/archimate3/icons/glyphs/application-component.svg +12 -0
  62. package/assets/archimate3/icons/glyphs/artifact.svg +9 -0
  63. package/assets/archimate3/icons/glyphs/assessment.svg +9 -0
  64. package/assets/archimate3/icons/glyphs/capability.svg +32 -0
  65. package/assets/archimate3/icons/glyphs/cloud-gear.svg +3 -0
  66. package/assets/archimate3/icons/glyphs/collaboration.svg +15 -0
  67. package/assets/archimate3/icons/glyphs/communication-network.svg +12 -0
  68. package/assets/archimate3/icons/glyphs/constraint.svg +10 -0
  69. package/assets/archimate3/icons/glyphs/contract.svg +5 -0
  70. package/assets/archimate3/icons/glyphs/course-of-action.svg +12 -0
  71. package/assets/archimate3/icons/glyphs/data-object.svg +4 -0
  72. package/assets/archimate3/icons/glyphs/deliverable.svg +3 -0
  73. package/assets/archimate3/icons/glyphs/device.svg +10 -0
  74. package/assets/archimate3/icons/glyphs/distribution-network.svg +11 -0
  75. package/assets/archimate3/icons/glyphs/driver.svg +16 -0
  76. package/assets/archimate3/icons/glyphs/equipment.svg +22 -0
  77. package/assets/archimate3/icons/glyphs/event.svg +6 -0
  78. package/assets/archimate3/icons/glyphs/facility.svg +7 -0
  79. package/assets/archimate3/icons/glyphs/function.svg +6 -0
  80. package/assets/archimate3/icons/glyphs/gap.svg +14 -0
  81. package/assets/archimate3/icons/glyphs/goal.svg +10 -0
  82. package/assets/archimate3/icons/glyphs/grouping.svg +4 -0
  83. package/assets/archimate3/icons/glyphs/interaction.svg +10 -0
  84. package/assets/archimate3/icons/glyphs/interface.svg +8 -0
  85. package/assets/archimate3/icons/glyphs/location.svg +6 -0
  86. package/assets/archimate3/icons/glyphs/material.svg +12 -0
  87. package/assets/archimate3/icons/glyphs/meaning.svg +3 -0
  88. package/assets/archimate3/icons/glyphs/node.svg +8 -0
  89. package/assets/archimate3/icons/glyphs/object.svg +4 -0
  90. package/assets/archimate3/icons/glyphs/outcome.svg +16 -0
  91. package/assets/archimate3/icons/glyphs/path.svg +10 -0
  92. package/assets/archimate3/icons/glyphs/person-silhouette.svg +3 -0
  93. package/assets/archimate3/icons/glyphs/plateau.svg +8 -0
  94. package/assets/archimate3/icons/glyphs/principle.svg +12 -0
  95. package/assets/archimate3/icons/glyphs/process.svg +6 -0
  96. package/assets/archimate3/icons/glyphs/product.svg +4 -0
  97. package/assets/archimate3/icons/glyphs/representation.svg +4 -0
  98. package/assets/archimate3/icons/glyphs/requirement.svg +6 -0
  99. package/assets/archimate3/icons/glyphs/resource.svg +14 -0
  100. package/assets/archimate3/icons/glyphs/role.svg +6 -0
  101. package/assets/archimate3/icons/glyphs/service.svg +6 -0
  102. package/assets/archimate3/icons/glyphs/stakeholder.svg +6 -0
  103. package/assets/archimate3/icons/glyphs/system-software.svg +14 -0
  104. package/assets/archimate3/icons/glyphs/value-stream.svg +3 -0
  105. package/assets/archimate3/icons/glyphs/value.svg +3 -0
  106. package/assets/archimate3/icons/glyphs/work-package.svg +4 -0
  107. package/assets/archimate3/icons/goal.svg +18 -0
  108. package/assets/archimate3/icons/grouping.svg +12 -0
  109. package/assets/archimate3/icons/implementation-event.svg +15 -0
  110. package/assets/archimate3/icons/location.svg +14 -0
  111. package/assets/archimate3/icons/material.svg +21 -0
  112. package/assets/archimate3/icons/meaning.svg +11 -0
  113. package/assets/archimate3/icons/node.svg +14 -0
  114. package/assets/archimate3/icons/or-junction.svg +3 -0
  115. package/assets/archimate3/icons/outcome.svg +25 -0
  116. package/assets/archimate3/icons/path.svg +18 -0
  117. package/assets/archimate3/icons/plateau.svg +16 -0
  118. package/assets/archimate3/icons/principle.svg +21 -0
  119. package/assets/archimate3/icons/product.svg +12 -0
  120. package/assets/archimate3/icons/representation.svg +12 -0
  121. package/assets/archimate3/icons/requirement.svg +14 -0
  122. package/assets/archimate3/icons/resource.svg +23 -0
  123. package/assets/archimate3/icons/stakeholder.svg +15 -0
  124. package/assets/archimate3/icons/system-software.svg +22 -0
  125. package/assets/archimate3/icons/technology-collaboration.svg +22 -0
  126. package/assets/archimate3/icons/technology-event.svg +15 -0
  127. package/assets/archimate3/icons/technology-function.svg +14 -0
  128. package/assets/archimate3/icons/technology-interaction.svg +18 -0
  129. package/assets/archimate3/icons/technology-interface.svg +16 -0
  130. package/assets/archimate3/icons/technology-process.svg +14 -0
  131. package/assets/archimate3/icons/technology-service.svg +14 -0
  132. package/assets/archimate3/icons/value-stream.svg +11 -0
  133. package/assets/archimate3/icons/value.svg +11 -0
  134. package/assets/archimate3/icons/work-package.svg +12 -0
  135. package/assets/archimate4/archimate4-element-shapes.ttl +404 -0
  136. package/assets/archimate4/archimate4-metamodel.ttl +179 -0
  137. package/assets/archimate4/archimate4-notation.ttl +1147 -0
  138. package/assets/archimate4/archimate4-onto.ttl +1559 -0
  139. package/assets/archimate4/archimate4-presentation-contexts.ttl +60 -0
  140. package/assets/archimate4/archimate4-principle-shapes.ttl +895 -0
  141. package/assets/archimate4/archimate4-questions.ttl +1224 -0
  142. package/assets/archimate4/archimate4-reference-data.ttl +56 -0
  143. package/assets/archimate4/archimate4-relationship-shapes.ttl +16920 -0
  144. package/assets/archimate4/archimate4-relationship-tables.ttl +3200 -0
  145. package/assets/archimate4/archimate4-tax.ttl +749 -0
  146. package/assets/archimate4/archimate4-viewpoint-shapes.ttl +55 -0
  147. package/assets/archimate4/archimate4-viewpoints.ttl +777 -0
  148. package/assets/archimate4/icons/and-junction.svg +3 -0
  149. package/assets/archimate4/icons/application-component.svg +18 -0
  150. package/assets/archimate4/icons/application-interface.svg +16 -0
  151. package/assets/archimate4/icons/artifact.svg +16 -0
  152. package/assets/archimate4/icons/assessment.svg +17 -0
  153. package/assets/archimate4/icons/business-actor.svg +22 -0
  154. package/assets/archimate4/icons/business-interface.svg +16 -0
  155. package/assets/archimate4/icons/business-object.svg +14 -0
  156. package/assets/archimate4/icons/capability.svg +40 -0
  157. package/assets/archimate4/icons/collaboration.svg +21 -0
  158. package/assets/archimate4/icons/communication-network.svg +18 -0
  159. package/assets/archimate4/icons/course-of-action.svg +20 -0
  160. package/assets/archimate4/icons/data-object.svg +14 -0
  161. package/assets/archimate4/icons/deliverable.svg +11 -0
  162. package/assets/archimate4/icons/device.svg +18 -0
  163. package/assets/archimate4/icons/distribution-network.svg +19 -0
  164. package/assets/archimate4/icons/driver.svg +24 -0
  165. package/assets/archimate4/icons/equipment.svg +31 -0
  166. package/assets/archimate4/icons/event.svg +15 -0
  167. package/assets/archimate4/icons/facility.svg +16 -0
  168. package/assets/archimate4/icons/function.svg +13 -0
  169. package/assets/archimate4/icons/glyphs/activity.svg +3 -0
  170. package/assets/archimate4/icons/glyphs/actor.svg +14 -0
  171. package/assets/archimate4/icons/glyphs/application-component.svg +12 -0
  172. package/assets/archimate4/icons/glyphs/artifact.svg +9 -0
  173. package/assets/archimate4/icons/glyphs/assessment.svg +9 -0
  174. package/assets/archimate4/icons/glyphs/capability.svg +32 -0
  175. package/assets/archimate4/icons/glyphs/cloud-gear.svg +3 -0
  176. package/assets/archimate4/icons/glyphs/collaboration.svg +15 -0
  177. package/assets/archimate4/icons/glyphs/communication-network.svg +12 -0
  178. package/assets/archimate4/icons/glyphs/constraint.svg +10 -0
  179. package/assets/archimate4/icons/glyphs/contract.svg +5 -0
  180. package/assets/archimate4/icons/glyphs/course-of-action.svg +12 -0
  181. package/assets/archimate4/icons/glyphs/data-object.svg +4 -0
  182. package/assets/archimate4/icons/glyphs/deliverable.svg +3 -0
  183. package/assets/archimate4/icons/glyphs/device.svg +10 -0
  184. package/assets/archimate4/icons/glyphs/distribution-network.svg +11 -0
  185. package/assets/archimate4/icons/glyphs/driver.svg +16 -0
  186. package/assets/archimate4/icons/glyphs/equipment.svg +22 -0
  187. package/assets/archimate4/icons/glyphs/event.svg +6 -0
  188. package/assets/archimate4/icons/glyphs/facility.svg +7 -0
  189. package/assets/archimate4/icons/glyphs/function.svg +6 -0
  190. package/assets/archimate4/icons/glyphs/gap.svg +14 -0
  191. package/assets/archimate4/icons/glyphs/goal.svg +10 -0
  192. package/assets/archimate4/icons/glyphs/grouping.svg +4 -0
  193. package/assets/archimate4/icons/glyphs/interaction.svg +10 -0
  194. package/assets/archimate4/icons/glyphs/interface.svg +8 -0
  195. package/assets/archimate4/icons/glyphs/location.svg +6 -0
  196. package/assets/archimate4/icons/glyphs/material.svg +12 -0
  197. package/assets/archimate4/icons/glyphs/meaning.svg +3 -0
  198. package/assets/archimate4/icons/glyphs/node.svg +8 -0
  199. package/assets/archimate4/icons/glyphs/object.svg +4 -0
  200. package/assets/archimate4/icons/glyphs/outcome.svg +16 -0
  201. package/assets/archimate4/icons/glyphs/path.svg +10 -0
  202. package/assets/archimate4/icons/glyphs/person-silhouette.svg +3 -0
  203. package/assets/archimate4/icons/glyphs/plateau.svg +8 -0
  204. package/assets/archimate4/icons/glyphs/principle.svg +12 -0
  205. package/assets/archimate4/icons/glyphs/process.svg +6 -0
  206. package/assets/archimate4/icons/glyphs/product.svg +4 -0
  207. package/assets/archimate4/icons/glyphs/representation.svg +4 -0
  208. package/assets/archimate4/icons/glyphs/requirement.svg +6 -0
  209. package/assets/archimate4/icons/glyphs/resource.svg +14 -0
  210. package/assets/archimate4/icons/glyphs/role.svg +6 -0
  211. package/assets/archimate4/icons/glyphs/service.svg +6 -0
  212. package/assets/archimate4/icons/glyphs/stakeholder.svg +6 -0
  213. package/assets/archimate4/icons/glyphs/system-software.svg +14 -0
  214. package/assets/archimate4/icons/glyphs/value-stream.svg +3 -0
  215. package/assets/archimate4/icons/glyphs/value.svg +3 -0
  216. package/assets/archimate4/icons/glyphs/work-package.svg +4 -0
  217. package/assets/archimate4/icons/goal.svg +18 -0
  218. package/assets/archimate4/icons/grouping.svg +12 -0
  219. package/assets/archimate4/icons/location.svg +14 -0
  220. package/assets/archimate4/icons/material.svg +21 -0
  221. package/assets/archimate4/icons/meaning.svg +11 -0
  222. package/assets/archimate4/icons/node.svg +14 -0
  223. package/assets/archimate4/icons/or-junction.svg +3 -0
  224. package/assets/archimate4/icons/outcome.svg +25 -0
  225. package/assets/archimate4/icons/path.svg +18 -0
  226. package/assets/archimate4/icons/plateau.svg +16 -0
  227. package/assets/archimate4/icons/principle.svg +21 -0
  228. package/assets/archimate4/icons/process.svg +15 -0
  229. package/assets/archimate4/icons/product.svg +12 -0
  230. package/assets/archimate4/icons/requirement.svg +14 -0
  231. package/assets/archimate4/icons/resource.svg +23 -0
  232. package/assets/archimate4/icons/role.svg +16 -0
  233. package/assets/archimate4/icons/service.svg +13 -0
  234. package/assets/archimate4/icons/stakeholder.svg +15 -0
  235. package/assets/archimate4/icons/system-software.svg +22 -0
  236. package/assets/archimate4/icons/technology-interface.svg +16 -0
  237. package/assets/archimate4/icons/value-stream.svg +11 -0
  238. package/assets/archimate4/icons/value.svg +11 -0
  239. package/assets/archimate4/icons/work-package.svg +12 -0
  240. package/assets/basic/basic-metamodel.ttl +100 -0
  241. package/assets/basic/basic-notation-bubble.ttl +175 -0
  242. package/assets/basic/basic-notation.ttl +172 -0
  243. package/assets/basic/basic-onto.ttl +171 -0
  244. package/assets/basic/basic-presentation-contexts.ttl +70 -0
  245. package/assets/basic/basic-tax.ttl +130 -0
  246. package/assets/basic/icons/aggregation.svg +7 -0
  247. package/assets/basic/icons/association.svg +6 -0
  248. package/assets/basic/icons/element.svg +5 -0
  249. package/assets/basic/icons/glyphs/aggregation.svg +6 -0
  250. package/assets/basic/icons/glyphs/association.svg +5 -0
  251. package/assets/basic/icons/glyphs/element.svg +5 -0
  252. package/assets/basic/icons/glyphs/relationship.svg +5 -0
  253. package/assets/basic/icons/relationship.svg +7 -0
  254. package/assets/basic/notation-bubble/icons/aggregation.svg +7 -0
  255. package/assets/basic/notation-bubble/icons/association.svg +6 -0
  256. package/assets/basic/notation-bubble/icons/element.svg +5 -0
  257. package/assets/basic/notation-bubble/icons/glyphs/aggregation.svg +6 -0
  258. package/assets/basic/notation-bubble/icons/glyphs/association.svg +5 -0
  259. package/assets/basic/notation-bubble/icons/glyphs/element.svg +5 -0
  260. package/assets/basic/notation-bubble/icons/glyphs/relationship.svg +5 -0
  261. package/assets/basic/notation-bubble/icons/relationship.svg +7 -0
  262. package/assets/catalog.ttl +7406 -0
  263. package/assets/core/core-notation.ttl +131 -0
  264. package/assets/core/core-onto.ttl +2811 -0
  265. package/assets/core/core-questions.ttl +957 -0
  266. package/assets/core/core-shapes.ttl +915 -0
  267. package/assets/core/core-vis-onto.ttl +1408 -0
  268. package/assets/core/core-vis-shapes.ttl +851 -0
  269. package/assets/core-vis/markers/circle-dot.svg +3 -0
  270. package/assets/core-vis/markers/closed-arrowhead.svg +3 -0
  271. package/assets/core-vis/markers/filled-diamond.svg +3 -0
  272. package/assets/core-vis/markers/half-arrowhead.svg +3 -0
  273. package/assets/core-vis/markers/hollow-arrowhead.svg +3 -0
  274. package/assets/core-vis/markers/hollow-diamond.svg +3 -0
  275. package/assets/core-vis/markers/open-arrowhead.svg +3 -0
  276. package/fixtures/interoperability/archimate4-demo.trig +259 -0
  277. package/fixtures/interoperability/expected-findings.json +26 -0
  278. package/fixtures/interoperability/shop-seed.ttl +225 -0
  279. package/package.json +136 -4
  280. package/scripts/sync-assets.mjs +252 -0
  281. package/src/conformance.ts +66 -0
  282. package/src/import-export/model-io.ts +426 -0
  283. package/src/index.ts +11 -0
  284. package/src/metamodel-manager/asset-sources.ts +754 -0
  285. package/src/metamodel-manager/bundled-assets.ts +599 -0
  286. package/src/metamodel-manager/catalogue.ts +114 -0
  287. package/src/metamodel-manager/class-hierarchy.ts +155 -0
  288. package/src/metamodel-manager/index.ts +65 -0
  289. package/src/metamodel-manager/interfaces.ts +422 -0
  290. package/src/metamodel-manager/metamodel-completeness.ts +162 -0
  291. package/src/metamodel-manager/metamodel-loader.ts +864 -0
  292. package/src/metamodel-manager/notation-resolver.ts +284 -0
  293. package/src/metamodel-manager/notation.ts +659 -0
  294. package/src/metamodel-manager/palette-generator.ts +882 -0
  295. package/src/metamodel-manager/property-shapes.ts +290 -0
  296. package/src/metamodel-manager/taxonomy.ts +904 -0
  297. package/src/metamodel-manager/type-guide.ts +241 -0
  298. package/src/metamodel-manager/viewpoint-manager.ts +147 -0
  299. package/src/model-manager/appearance.ts +389 -0
  300. package/src/model-manager/cascade.ts +246 -0
  301. package/src/model-manager/clipboard.ts +566 -0
  302. package/src/model-manager/context-names.ts +108 -0
  303. package/src/model-manager/custom-properties.ts +549 -0
  304. package/src/model-manager/derivations.ts +166 -0
  305. package/src/model-manager/direct-permissions.ts +182 -0
  306. package/src/model-manager/drawing-order.ts +119 -0
  307. package/src/model-manager/element-manager.ts +69 -0
  308. package/src/model-manager/element-pictures.ts +118 -0
  309. package/src/model-manager/field-names.ts +42 -0
  310. package/src/model-manager/folders.ts +354 -0
  311. package/src/model-manager/grid.ts +6 -0
  312. package/src/model-manager/index.ts +43 -0
  313. package/src/model-manager/interfaces.ts +417 -0
  314. package/src/model-manager/iri-conformance.ts +183 -0
  315. package/src/model-manager/label-expression.ts +233 -0
  316. package/src/model-manager/legacy-migration.ts +200 -0
  317. package/src/model-manager/missing-references.ts +86 -0
  318. package/src/model-manager/model-diff-text.ts +150 -0
  319. package/src/model-manager/model-diff.ts +534 -0
  320. package/src/model-manager/model-merge.ts +1160 -0
  321. package/src/model-manager/model-namespace.ts +199 -0
  322. package/src/model-manager/model-operations.ts +132 -0
  323. package/src/model-manager/model-queries.ts +616 -0
  324. package/src/model-manager/model-session.ts +759 -0
  325. package/src/model-manager/multiplicity.ts +74 -0
  326. package/src/model-manager/nested-resources.ts +145 -0
  327. package/src/model-manager/own-metamodel.ts +157 -0
  328. package/src/model-manager/placement-copy.ts +116 -0
  329. package/src/model-manager/property-catalog.ts +787 -0
  330. package/src/model-manager/proposal-order.ts +203 -0
  331. package/src/model-manager/provenance.ts +396 -0
  332. package/src/model-manager/questions.ts +475 -0
  333. package/src/model-manager/rdf-scope.ts +97 -0
  334. package/src/model-manager/relationship-graph.ts +462 -0
  335. package/src/model-manager/relationship-manager.ts +962 -0
  336. package/src/model-manager/relationship-table.ts +189 -0
  337. package/src/model-manager/relationship-validity.ts +261 -0
  338. package/src/model-manager/resource-edits.ts +28 -0
  339. package/src/model-manager/short-hash.ts +104 -0
  340. package/src/model-manager/snapshot-lines.ts +88 -0
  341. package/src/model-manager/version-history.ts +205 -0
  342. package/src/model-manager/view-from-results.ts +81 -0
  343. package/src/model-manager/view-manager.ts +1410 -0
  344. package/src/model-manager/vocabulary.ts +279 -0
  345. package/src/rdf-engine/finding-shape.ts +23 -0
  346. package/src/rdf-engine/graph-scope.ts +163 -0
  347. package/src/rdf-engine/index.ts +7 -0
  348. package/src/rdf-engine/interfaces.ts +144 -0
  349. package/src/rdf-engine/iri.ts +203 -0
  350. package/src/rdf-engine/localized-text.ts +13 -0
  351. package/src/rdf-engine/namespaces.ts +41 -0
  352. package/src/rdf-engine/native-load.ts +37 -0
  353. package/src/rdf-engine/observable-store.ts +609 -0
  354. package/src/rdf-engine/rdf-store.ts +520 -0
  355. package/src/rdf-engine/shacl-validator.ts +602 -0
  356. package/src/rdf-engine/shape-reach.ts +140 -0
  357. package/src/rdf-engine/shape-switches.ts +165 -0
  358. package/src/rdf-engine/single-valued.ts +219 -0
  359. package/src/rdf-engine/sparql-constraints.ts +349 -0
  360. package/src/rdf-engine/term-codec.ts +51 -0
  361. package/src/rdf-engine/ttl-parser.ts +51 -0
  362. package/src/rdf-engine/ttl-serializer.ts +79 -0
  363. package/src/rdf-engine/turtle-writer.ts +284 -0
  364. package/src/rdf-engine/validation-engine.ts +747 -0
  365. package/src/rdf-engine/validation-service.ts +186 -0
  366. package/src/rdf-engine/validation.worker.ts +47 -0
@@ -0,0 +1,895 @@
1
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
2
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
3
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
6
+ @prefix dcterms: <http://purl.org/dc/terms/> .
7
+ @prefix bibo: <http://purl.org/ontology/bibo/> .
8
+ @prefix vann: <http://purl.org/vocab/vann/> .
9
+ @prefix cc: <http://creativecommons.org/ns#> .
10
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
11
+
12
+ @prefix arch: <https://meta.linked.archi/core#> .
13
+ @prefix am4: <https://meta.linked.archi/archimate4/onto#> .
14
+ @prefix : <https://meta.linked.archi/archimate4/principle-shapes#> .
15
+
16
+ <https://meta.linked.archi/archimate4/principle-shapes#>
17
+ rdf:type owl:Ontology ;
18
+ owl:imports <https://meta.linked.archi/core#>,
19
+ <https://meta.linked.archi/core-shapes#> ;
20
+ cc:license "http://creativecommons.org/licenses/by/4.0/" ;
21
+ vann:preferredNamespaceUri "https://meta.linked.archi/archimate4/principle-shapes#" ;
22
+ vann:preferredNamespacePrefix "am4psh" ;
23
+ dcterms:creator "Kalin Maldzhanski"^^xsd:string ;
24
+ dcterms:title "Linked.Archi ArchiMate 4.0 Architecture Principle Shapes"@en ;
25
+ dcterms:description '''SHACL shapes encoding common enterprise architecture principles
26
+ as executable constraints. Adapted from 3.2 principle shapes for ArchiMate 4.0
27
+ domain-based structure.'''@en ;
28
+ dcterms:created "2026-04-19"^^xsd:date ;
29
+ skos:historyNote '''2026-12-02: SinglePointOfFailureShape counts each service's providers, from the service — the
30
+ same findings, without testing every node, device and system software of the model for each provider found.
31
+ TechnologyServingBusinessDirectlyShape tests what makes the served element the business's in a FILTER EXISTS,
32
+ once the element is bound, rather than joining a union of them: the same findings, in 0.2 s rather than 18 s
33
+ on a model of 300 000 triples.
34
+ 2026-11-29: SinglePointOfFailureShape looks at technology — a service
35
+ provided by one node, device or system software — and no longer at one application component realizing
36
+ a service. RedundancyAvoidanceShape is removed: RedundantApplicationRealizingServiceShape adapts it for
37
+ application components, and two technology elements providing a service are redundancy, not duplication.
38
+ RedundantFunctionRealizationShape is removed: several applications serving a function is normal use, and
39
+ FunctionAutomatedByMultipleApplicationsShape reports the redundancy. SingleBusinessObjectOwnerShape counts
40
+ writers, as SingleDataWriterShape does. TechnologyServingBusinessDirectlyShape covers devices and system
41
+ software, and roles and functions of the business, leaving processes to
42
+ BusinessProcessDirectTechnologyDependencyShape. ApplicationComponentWithoutServiceShape accepts a service
43
+ realized through the component's behaviour or exposed by its interface; CriticalNodeSingleDeploymentShape
44
+ counts devices as hosts; CapabilityWithoutGoalShape accepts influence and no longer a goal serving a
45
+ capability, which the relationship tables do not permit. CompositionMultipleParentWarning gains a label and
46
+ a definition. Membership tests are written with FILTER IN, not VALUES, which SHACL-SPARQL does not allow
47
+ with pre-bound variables.
48
+
49
+ 2026-11-06: OrphanedElementShape written with MINUS rather than
50
+ FILTER NOT EXISTS — the same results, without testing every element against every other one; and
51
+ targeted at ArchiMate 4.0's elements and junctions rather than arch:Element, so that it judges no other
52
+ notation's elements and, with ArchiMate 3.2 loaded too, does not report an element twice.'''@en ;
53
+ dcterms:modified "2026-12-02"^^xsd:date ;
54
+ dcterms:publisher "Linked.Archi"@en, <https://linked.archi> ;
55
+ bibo:status "draft" ;
56
+ owl:versionIRI <https://meta.linked.archi/archimate4/principle-shapes/4.0#> ;
57
+ owl:versionInfo "4.0"@en ;
58
+ sh:declare [
59
+ sh:prefix "am4" ;
60
+ sh:namespace "https://meta.linked.archi/archimate4/onto#"^^xsd:anyURI ;
61
+ ] , [
62
+ sh:prefix "arch" ;
63
+ sh:namespace "https://meta.linked.archi/core#"^^xsd:anyURI ;
64
+ ] , [
65
+ sh:prefix "rdf" ;
66
+ sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ;
67
+ ] , [
68
+ sh:prefix "rdfs" ;
69
+ sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ;
70
+ ] ;
71
+ .
72
+
73
+ #################################################################
74
+ #
75
+ # CATEGORY 1: REDUNDANCY AVOIDANCE
76
+ #
77
+ # Principle: Avoid redundant application support for the same
78
+ # business capability or process. Multiple applications serving
79
+ # the same process for the same purpose indicate duplication
80
+ # that increases cost and complexity.
81
+ #
82
+ # Reference: Montecchiari & Hinkelmann (2026), Section 5.6,
83
+ # Listing 3 — "RedundancyAvoidanceShape", adapted here as
84
+ # RedundantApplicationRealizingServiceShape: application components
85
+ # only. Two technology elements providing one service are the
86
+ # redundancy SinglePointOfFailureShape asks for, not a duplication.
87
+ #
88
+ # Note: In ArchiMate 4.0, per-layer behavior elements are merged
89
+ # into Common Domain elements (Process, Function, Service), so a
90
+ # process, function or service belongs to no business or application
91
+ # domain; the rules below apply to every one. Active and passive
92
+ # structure keep their domains (BusinessDomainElement,
93
+ # ApplicationDomainElement, TechnologyDomainElement).
94
+ #
95
+ #################################################################
96
+
97
+ :RedundantApplicationRealizingServiceShape
98
+ a sh:NodeShape ;
99
+ sh:targetClass am4:Service ;
100
+ sh:severity sh:Warning ;
101
+ skos:prefLabel "Redundant Application Realizing Service"@en ;
102
+ skos:definition
103
+ '''Detects services realized by more than one application
104
+ component. Multiple components realizing the same service
105
+ may indicate duplication in the application landscape.'''@en ;
106
+ sh:sparql [
107
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
108
+ sh:message "Service {$this} is realized by multiple application components ({?app1} and {?app2})."@en ;
109
+ sh:select """
110
+ SELECT $this ?app1 ?app2
111
+ WHERE {
112
+ $this a am4:Service .
113
+ ?app1 a am4:ApplicationComponent ;
114
+ am4:realizes $this .
115
+ ?app2 a am4:ApplicationComponent ;
116
+ am4:realizes $this .
117
+ FILTER(STR(?app1) < STR(?app2))
118
+ }
119
+ """ ;
120
+ ] ;
121
+ .
122
+
123
+
124
+ #################################################################
125
+ #
126
+ # CATEGORY 2: SINGLE AUTHORITATIVE SOURCE
127
+ #
128
+ # Principle: Each data object should be owned/updated by exactly
129
+ # one application component. Multiple writers to the same data
130
+ # create consistency risks and governance gaps.
131
+ #
132
+ # Reference: Montecchiari & Hinkelmann (2026), Section 6.3–6.4,
133
+ # Table 1 — "Single authoritative update source for data objects"
134
+ #
135
+ #################################################################
136
+
137
+ :SingleDataWriterShape
138
+ a sh:NodeShape ;
139
+ sh:targetClass am4:DataObject ;
140
+ sh:severity sh:Warning ;
141
+ skos:prefLabel "Single Authoritative Data Writer"@en ;
142
+ skos:definition
143
+ '''Detects data objects accessed with write by more than one
144
+ application component. Each data object should have a single
145
+ authoritative source of updates to ensure consistency.'''@en ;
146
+ sh:sparql [
147
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
148
+ sh:message "Data object {$this} is written by multiple application components ({?app1} and {?app2}). Designate a single authoritative source."@en ;
149
+ sh:select """
150
+ SELECT DISTINCT $this ?app1 ?app2
151
+ WHERE {
152
+ $this a am4:DataObject .
153
+ # A writer: write or read/write access, or an access not stated to be a read.
154
+ ?app1 a am4:ApplicationComponent .
155
+ {
156
+ ?app1 am4:accesses $this .
157
+ FILTER NOT EXISTS { ?read1 a am4:ReadAccess ; arch:source ?app1 ; arch:target $this . }
158
+ } UNION {
159
+ ?write1 a ?kind1 ; arch:source ?app1 ; arch:target $this .
160
+ FILTER(?kind1 IN (am4:WriteAccess, am4:ReadWriteAccess))
161
+ }
162
+ ?app2 a am4:ApplicationComponent .
163
+ {
164
+ ?app2 am4:accesses $this .
165
+ FILTER NOT EXISTS { ?read2 a am4:ReadAccess ; arch:source ?app2 ; arch:target $this . }
166
+ } UNION {
167
+ ?write2 a ?kind2 ; arch:source ?app2 ; arch:target $this .
168
+ FILTER(?kind2 IN (am4:WriteAccess, am4:ReadWriteAccess))
169
+ }
170
+ FILTER(STR(?app1) < STR(?app2))
171
+ }
172
+ """ ;
173
+ ] ;
174
+ .
175
+
176
+ :SingleBusinessObjectOwnerShape
177
+ a sh:NodeShape ;
178
+ sh:targetClass am4:BusinessObject ;
179
+ sh:severity sh:Warning ;
180
+ skos:prefLabel "Single Business Object Writer"@en ;
181
+ skos:definition
182
+ '''Detects business objects written by more than one application
183
+ component. Shared updates without a single authoritative writer
184
+ create governance ambiguity; components that only read a business
185
+ object share it without blurring who owns it.'''@en ;
186
+ skos:scopeNote
187
+ '''A writer as SingleDataWriterShape counts one: write or read/write access,
188
+ or an access not stated to be a read. The relationship tables permit an
189
+ application component only to access a business object, never to be
190
+ assigned to it, so what it writes is the only sign of ownership.'''@en ;
191
+ sh:sparql [
192
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
193
+ sh:message "Business object {$this} is written by multiple application components ({?app1} and {?app2}). Clarify ownership."@en ;
194
+ sh:select """
195
+ SELECT DISTINCT $this ?app1 ?app2
196
+ WHERE {
197
+ $this a am4:BusinessObject .
198
+ # A writer: write or read/write access, or an access not stated to be a read.
199
+ ?app1 a am4:ApplicationComponent .
200
+ {
201
+ ?app1 am4:accesses $this .
202
+ FILTER NOT EXISTS { ?read1 a am4:ReadAccess ; arch:source ?app1 ; arch:target $this . }
203
+ } UNION {
204
+ ?write1 a ?kind1 ; arch:source ?app1 ; arch:target $this .
205
+ FILTER(?kind1 IN (am4:WriteAccess, am4:ReadWriteAccess))
206
+ }
207
+ ?app2 a am4:ApplicationComponent .
208
+ {
209
+ ?app2 am4:accesses $this .
210
+ FILTER NOT EXISTS { ?read2 a am4:ReadAccess ; arch:source ?app2 ; arch:target $this . }
211
+ } UNION {
212
+ ?write2 a ?kind2 ; arch:source ?app2 ; arch:target $this .
213
+ FILTER(?kind2 IN (am4:WriteAccess, am4:ReadWriteAccess))
214
+ }
215
+ FILTER(STR(?app1) < STR(?app2))
216
+ }
217
+ """ ;
218
+ ] ;
219
+ .
220
+
221
+
222
+ #################################################################
223
+ #
224
+ # CATEGORY 3: STEWARDSHIP AND GOVERNANCE
225
+ #
226
+ # Principle: Critical architecture elements must have assigned
227
+ # ownership and governance. Unowned elements create accountability
228
+ # gaps.
229
+ #
230
+ # Reference: Montecchiari & Hinkelmann (2026), Section 6.2 —
231
+ # "MDM governance for critical business objects"
232
+ #
233
+ # Note: In ArchiMate 4.0, Role is a Common Domain element.
234
+ # BusinessActor remains in the Business Domain.
235
+ #
236
+ #################################################################
237
+
238
+ :ApplicationComponentOwnershipShape
239
+ a sh:NodeShape ;
240
+ sh:targetClass am4:ApplicationComponent ;
241
+ sh:severity sh:Warning ;
242
+ skos:prefLabel "Application Component Ownership"@en ;
243
+ skos:definition
244
+ '''Every application component should have a business actor or
245
+ role that owns it, associated with the component.'''@en ;
246
+ skos:scopeNote
247
+ '''ArchiMate has no ownership relationship, and its relationship
248
+ tables do not let a business actor or role be assigned to an
249
+ application component; an association between the two, in
250
+ either direction, is read as ownership.'''@en ;
251
+ sh:sparql [
252
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
253
+ sh:message "Application component {$this} has no business actor or role associated with it as its owner."@en ;
254
+ sh:select """
255
+ SELECT $this
256
+ WHERE {
257
+ $this a am4:ApplicationComponent .
258
+ FILTER NOT EXISTS {
259
+ { ?owner am4:associatedWith $this . } UNION { $this am4:associatedWith ?owner . }
260
+ { ?owner a am4:BusinessActor . } UNION { ?owner a am4:Role . }
261
+ }
262
+ }
263
+ """ ;
264
+ ] ;
265
+ .
266
+
267
+ :ProcessPerformerShape
268
+ a sh:NodeShape ;
269
+ sh:targetClass am4:Process ;
270
+ sh:severity sh:Warning ;
271
+ skos:prefLabel "Process Performer"@en ;
272
+ skos:definition
273
+ '''Every process should have something assigned to perform it — a business actor, a role,
274
+ an application component, a node, … — that is responsible for it.'''@en ;
275
+ sh:sparql [
276
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
277
+ sh:message "Process {$this} has nothing assigned to perform it (an actor, a role or a component)."@en ;
278
+ sh:select """
279
+ SELECT $this
280
+ WHERE {
281
+ $this a am4:Process .
282
+ FILTER NOT EXISTS {
283
+ ?performer am4:assignedTo $this .
284
+ ?performer rdf:type/rdfs:subClassOf* am4:ActiveStructureElement .
285
+ }
286
+ }
287
+ """ ;
288
+ ] ;
289
+ .
290
+
291
+ :DataObjectStewardshipShape
292
+ a sh:NodeShape ;
293
+ sh:targetClass am4:DataObject ;
294
+ sh:severity sh:Warning ;
295
+ skos:prefLabel "Data Object Stewardship"@en ;
296
+ skos:definition
297
+ '''Critical data objects should have at least one application
298
+ component assigned to them (their system of record) or accessing
299
+ them.'''@en ;
300
+ skos:scopeNote
301
+ '''ArchiMate 4.0 lets active structure be assigned to passive structure:
302
+ the relationship tables permit an application component to be assigned
303
+ to a data object directly — the component responsible for it, its system
304
+ of record — as well as to access it. ArchiMate 3.2 permits access only.'''@en ;
305
+ sh:sparql [
306
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
307
+ sh:message "Data object {$this} has no application component assigned to it or accessing it. Assign a system of record."@en ;
308
+ sh:select """
309
+ SELECT $this
310
+ WHERE {
311
+ $this a am4:DataObject .
312
+ FILTER NOT EXISTS {
313
+ ?app a am4:ApplicationComponent .
314
+ {
315
+ ?app am4:accesses $this .
316
+ } UNION {
317
+ ?app am4:assignedTo $this .
318
+ }
319
+ }
320
+ }
321
+ """ ;
322
+ ] ;
323
+ .
324
+
325
+
326
+ #################################################################
327
+ #
328
+ # CATEGORY 4: SEPARATION OF CONCERNS
329
+ #
330
+ # Principle: Architecture domains should maintain clear boundaries.
331
+ # Business logic should not leak into technology, and technology
332
+ # concerns should not pollute business processes.
333
+ #
334
+ # Note: In ArchiMate 4.0, "layers" are replaced by "domains"
335
+ # (BusinessDomainElement, TechnologyDomainElement, etc.). Behaviour
336
+ # and roles are common to all of them: a business process, function
337
+ # or role is one a business actor performs or fills, directly or
338
+ # through a role. The two shapes below share the work: technology
339
+ # serving or realizing a business process is reported from the
340
+ # process, anything else of the business it serves from the
341
+ # technology element.
342
+ #
343
+ #################################################################
344
+
345
+ :BusinessProcessDirectTechnologyDependencyShape
346
+ a sh:NodeShape ;
347
+ sh:targetClass am4:Process ;
348
+ sh:severity sh:Warning ;
349
+ skos:prefLabel "Business Process Direct Technology Dependency"@en ;
350
+ skos:definition
351
+ '''Business processes — processes a business actor performs, directly or through a role —
352
+ should not directly depend on technology domain elements. An application domain should
353
+ mediate between business and technology.'''@en ;
354
+ sh:sparql [
355
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
356
+ sh:message "Business process {$this} has a direct serving/realization dependency on technology element {?tech}. Introduce an application domain mediator."@en ;
357
+ sh:select """
358
+ SELECT $this ?tech
359
+ WHERE {
360
+ $this a am4:Process .
361
+ # Business: performed by a business actor, directly or through a role.
362
+ FILTER EXISTS {
363
+ ?actor a am4:BusinessActor .
364
+ { ?actor am4:assignedTo $this . }
365
+ UNION
366
+ { ?actor am4:assignedTo ?role . ?role a am4:Role ; am4:assignedTo $this . }
367
+ }
368
+ {
369
+ ?tech am4:serves $this .
370
+ } UNION {
371
+ ?tech am4:realizes $this .
372
+ }
373
+ ?tech rdf:type/rdfs:subClassOf* am4:TechnologyDomainElement .
374
+ }
375
+ """ ;
376
+ ] ;
377
+ .
378
+
379
+ :TechnologyServingBusinessDirectlyShape
380
+ a sh:NodeShape ;
381
+ sh:targetClass am4:Node , am4:Device , am4:SystemSoftware ;
382
+ sh:severity sh:Warning ;
383
+ skos:prefLabel "Technology Serving Business Directly"@en ;
384
+ skos:definition
385
+ '''Nodes, devices and system software should not directly serve the
386
+ business — a business domain element, a role a business actor fills,
387
+ or a function a business actor performs, directly or through a role.
388
+ Services should be exposed through the application domain.'''@en ;
389
+ skos:scopeNote
390
+ '''A business process served directly by technology is reported by
391
+ BusinessProcessDirectTechnologyDependencyShape, from the process, and
392
+ not here, so that one relationship gives one result.'''@en ;
393
+ sh:sparql [
394
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
395
+ sh:message "Technology element {$this} directly serves business element {?biz}. Route through the application domain."@en ;
396
+ sh:select """
397
+ SELECT DISTINCT $this ?biz
398
+ WHERE {
399
+ $this a ?techType ;
400
+ am4:serves ?biz .
401
+ FILTER(?techType IN (am4:Node, am4:Device, am4:SystemSoftware))
402
+ # What makes ?biz the business's, tested once ?biz is bound, from ?biz. Joined with the
403
+ # patterns above as a union instead, it took Oxigraph 18 s on a model of 300 000 triples,
404
+ # where each of its branches alone took under 0.1 s.
405
+ FILTER EXISTS {
406
+ {
407
+ ?biz rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
408
+ } UNION {
409
+ # A role a business actor fills.
410
+ ?biz a am4:Role .
411
+ ?actor am4:assignedTo ?biz ;
412
+ a am4:BusinessActor .
413
+ } UNION {
414
+ # A function a business actor performs, directly or through a role.
415
+ ?biz rdf:type/rdfs:subClassOf* am4:Function .
416
+ { ?actor am4:assignedTo ?biz . }
417
+ UNION
418
+ { ?role am4:assignedTo ?biz ; a am4:Role . ?actor am4:assignedTo ?role . }
419
+ ?actor a am4:BusinessActor .
420
+ }
421
+ }
422
+ }
423
+ """ ;
424
+ ] ;
425
+ .
426
+
427
+
428
+ #################################################################
429
+ #
430
+ # CATEGORY 5: SERVICE ORIENTATION
431
+ #
432
+ # Principle: Application components should expose their
433
+ # functionality through services. Direct component-to-component
434
+ # dependencies create tight coupling.
435
+ #
436
+ # Note: In ArchiMate 4.0, Service is a single Common Domain
437
+ # element replacing the per-layer ApplicationService,
438
+ # BusinessService, and TechnologyService.
439
+ #
440
+ #################################################################
441
+
442
+ :ApplicationComponentWithoutServiceShape
443
+ a sh:NodeShape ;
444
+ sh:targetClass am4:ApplicationComponent ;
445
+ sh:severity sh:Info ;
446
+ skos:prefLabel "Application Component Without Service"@en ;
447
+ skos:definition
448
+ '''Application components should expose at least one service —
449
+ realizing it, performing behaviour that realizes it, or through an
450
+ interface of theirs assigned to it. Components without services may
451
+ indicate missing service definitions or tightly coupled
452
+ integrations.'''@en ;
453
+ sh:sparql [
454
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
455
+ sh:message "Application component {$this} does not expose any service."@en ;
456
+ sh:select """
457
+ SELECT $this
458
+ WHERE {
459
+ $this a am4:ApplicationComponent .
460
+ FILTER NOT EXISTS {
461
+ ?svc a am4:Service .
462
+ {
463
+ $this am4:realizes ?svc .
464
+ } UNION {
465
+ # The function or process it performs realizes the service.
466
+ $this am4:assignedTo ?behaviour .
467
+ ?behaviour am4:realizes ?svc .
468
+ } UNION {
469
+ # An interface it is composed of is assigned to the service.
470
+ $this am4:composedOf ?interface .
471
+ ?interface a am4:ApplicationInterface ;
472
+ am4:assignedTo ?svc .
473
+ }
474
+ }
475
+ }
476
+ """ ;
477
+ ] ;
478
+ .
479
+
480
+ :DirectComponentToComponentServingShape
481
+ a sh:NodeShape ;
482
+ sh:targetClass am4:ApplicationComponent ;
483
+ sh:severity sh:Warning ;
484
+ skos:prefLabel "Direct Component-to-Component Serving"@en ;
485
+ skos:definition
486
+ '''Application components should serve other components through
487
+ services, not directly. Direct serving creates tight coupling
488
+ that hinders independent evolution.'''@en ;
489
+ sh:sparql [
490
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
491
+ sh:message "Application component {$this} directly serves another application component {?target} without an intermediary service."@en ;
492
+ sh:select """
493
+ SELECT $this ?target
494
+ WHERE {
495
+ $this a am4:ApplicationComponent .
496
+ $this am4:serves ?target .
497
+ ?target a am4:ApplicationComponent .
498
+ }
499
+ """ ;
500
+ ] ;
501
+ .
502
+
503
+
504
+ #################################################################
505
+ #
506
+ # CATEGORY 6: TECHNOLOGY STANDARDIZATION
507
+ #
508
+ # Principle: Technology choices should be standardized. Excessive
509
+ # technology diversity increases operational cost and risk.
510
+ #
511
+ #################################################################
512
+
513
+ :ExcessiveTechnologyDiversityPerServiceShape
514
+ a sh:NodeShape ;
515
+ sh:targetClass am4:Service ;
516
+ sh:severity sh:Info ;
517
+ skos:prefLabel "Excessive Technology Diversity Per Service"@en ;
518
+ skos:definition
519
+ '''Services realized by components that depend on many different
520
+ technology elements — nodes, devices, system software, … — may
521
+ indicate excessive technology diversity.'''@en ;
522
+ sh:sparql [
523
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
524
+ sh:message "Service {$this} depends on {?nodeCount} distinct technology elements. Consider standardizing."@en ;
525
+ sh:select """
526
+ SELECT $this (COUNT(DISTINCT ?node) AS ?nodeCount)
527
+ WHERE {
528
+ $this a am4:Service .
529
+ ?app am4:realizes $this .
530
+ ?app a am4:ApplicationComponent .
531
+ # Technology it depends on: serving or realizing the component, or hosting
532
+ # what realizes it (a node assigned to an artifact or system software).
533
+ ?node (am4:serves|am4:realizes|am4:assignedTo/am4:realizes) ?app .
534
+ ?node rdf:type/rdfs:subClassOf* am4:TechnologyDomainElement ,
535
+ am4:ActiveStructureElement .
536
+ }
537
+ GROUP BY $this
538
+ HAVING (COUNT(DISTINCT ?node) > 3)
539
+ """ ;
540
+ ] ;
541
+ .
542
+
543
+
544
+ #################################################################
545
+ #
546
+ # CATEGORY 7: SINGLE POINT OF FAILURE
547
+ #
548
+ # Principle: Critical services should not depend on a single piece
549
+ # of infrastructure without redundancy. Single points of failure
550
+ # threaten business continuity.
551
+ #
552
+ # Note: The rules here look at technology — the nodes, devices and
553
+ # system software that provide a service, and the nodes and devices
554
+ # an application component is deployed on. One application component
555
+ # realizing a service is not, by itself, a single point of failure:
556
+ # it may run on several nodes, which CriticalNodeSingleDeploymentShape
557
+ # checks.
558
+ #
559
+ #################################################################
560
+
561
+ :SinglePointOfFailureShape
562
+ a sh:NodeShape ;
563
+ sh:targetClass am4:Service ;
564
+ sh:severity sh:Info ;
565
+ skos:prefLabel "Single Point of Failure"@en ;
566
+ skos:definition
567
+ '''A service provided by exactly one technology active structure
568
+ element (a node, a device or system software), whether directly or
569
+ through the technology behaviour assigned to it, has no redundancy
570
+ and may be a single point of failure.'''@en ;
571
+ sh:sparql [
572
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
573
+ sh:message "Service {$this} is provided by only one technology element ({?infra}). Consider redundancy for critical infrastructure services."@en ;
574
+ sh:select """
575
+ SELECT $this (SAMPLE(?provider) AS ?infra)
576
+ WHERE {
577
+ $this a am4:Service .
578
+ # Provided by infrastructure: the element realizes the service, or is
579
+ # assigned to behaviour that does. Behaviour only: a device assigned to
580
+ # the system software that realizes the service hosts that one provider,
581
+ # and is not a second. The service's providers are counted, from the
582
+ # service: testing each against every other node, device and system
583
+ # software took Oxigraph from 0.3 s to 11 s, run to run, on a large model.
584
+ {
585
+ ?provider am4:realizes $this .
586
+ } UNION {
587
+ ?behaviour am4:realizes $this .
588
+ ?provider am4:assignedTo ?behaviour .
589
+ ?behaviour rdf:type/rdfs:subClassOf* am4:InternalBehaviorElement .
590
+ }
591
+ ?provider a ?type .
592
+ FILTER(?type IN (am4:Node, am4:Device, am4:SystemSoftware))
593
+ }
594
+ GROUP BY $this
595
+ HAVING (COUNT(DISTINCT ?provider) = 1)
596
+ """ ;
597
+ ] ;
598
+ .
599
+
600
+ :CriticalNodeSingleDeploymentShape
601
+ a sh:NodeShape ;
602
+ sh:targetClass am4:ApplicationComponent ;
603
+ sh:severity sh:Info ;
604
+ skos:prefLabel "Single Deployment Node"@en ;
605
+ skos:definition
606
+ '''Application components deployed on only one node or device
607
+ may lack resilience. Critical components should be deployed
608
+ across multiple nodes.'''@en ;
609
+ skos:scopeNote
610
+ '''System software is not counted as a host: it runs on a node or a
611
+ device, and counting both would make one machine two.'''@en ;
612
+ sh:sparql [
613
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
614
+ sh:message "Application component {$this} is deployed on only one node or device ({?node}). Consider multi-node deployment for resilience."@en ;
615
+ sh:select """
616
+ SELECT DISTINCT $this ?node
617
+ WHERE {
618
+ $this a am4:ApplicationComponent .
619
+ # Deployed on a node or a device: it realizes the component, or is assigned
620
+ # to an artifact or system software that does.
621
+ ?node (am4:realizes|am4:assignedTo/am4:realizes) $this ;
622
+ a ?hostType .
623
+ FILTER(?hostType IN (am4:Node, am4:Device))
624
+ FILTER NOT EXISTS {
625
+ ?node2 (am4:realizes|am4:assignedTo/am4:realizes) $this ;
626
+ a ?hostType2 .
627
+ FILTER(?hostType2 IN (am4:Node, am4:Device))
628
+ FILTER(?node2 != ?node)
629
+ }
630
+ }
631
+ """ ;
632
+ ] ;
633
+ .
634
+
635
+
636
+ #################################################################
637
+ #
638
+ # CATEGORY 8: COMPLETENESS AND TRACEABILITY
639
+ #
640
+ # Principle: Architecture models should be complete enough to
641
+ # support governance. Key elements should have required
642
+ # relationships and documentation.
643
+ #
644
+ # Note: In ArchiMate 4.0, BusinessService and ApplicationService
645
+ # are merged into the single Service element, a common domain
646
+ # element, and processes and functions are common too. The rules
647
+ # below apply to every service, process and function, whatever
648
+ # realizes or performs it.
649
+ #
650
+ #################################################################
651
+
652
+ :ServiceWithoutRealizationShape
653
+ a sh:NodeShape ;
654
+ sh:targetClass am4:Service ;
655
+ sh:severity sh:Warning ;
656
+ skos:prefLabel "Service Without Realization"@en ;
657
+ skos:definition
658
+ '''Every service should be realized by something — a process, a function, an application
659
+ component, … Unrealized services indicate incomplete modelling.'''@en ;
660
+ sh:sparql [
661
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
662
+ sh:message "Service {$this} is not realized by anything."@en ;
663
+ sh:select """
664
+ SELECT $this
665
+ WHERE {
666
+ $this a am4:Service .
667
+ FILTER NOT EXISTS {
668
+ ?realizer am4:realizes $this .
669
+ }
670
+ }
671
+ """ ;
672
+ ] ;
673
+ .
674
+
675
+ :CapabilityWithoutBehaviorRealizationShape
676
+ a sh:NodeShape ;
677
+ sh:targetClass am4:Capability ;
678
+ sh:severity sh:Warning ;
679
+ skos:prefLabel "Capability Without Behaviour Realization"@en ;
680
+ skos:definition
681
+ '''Capabilities should be realized by at least one behaviour
682
+ element (process, function, or interaction). A
683
+ capability without realization is aspirational only and
684
+ cannot be assessed for operational readiness.'''@en ;
685
+ sh:sparql [
686
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
687
+ sh:message "Capability {$this} is not realized by any process, function, or interaction."@en ;
688
+ sh:select """
689
+ SELECT $this
690
+ WHERE {
691
+ $this a am4:Capability .
692
+ FILTER NOT EXISTS {
693
+ ?behavior am4:realizes $this .
694
+ ?behavior rdf:type/rdfs:subClassOf* am4:BehaviorElement .
695
+ }
696
+ }
697
+ """ ;
698
+ ] ;
699
+ .
700
+
701
+ :ProcessAutomatedByMultipleApplicationsShape
702
+ a sh:NodeShape ;
703
+ sh:targetClass am4:Process ;
704
+ sh:severity sh:Warning ;
705
+ skos:prefLabel "Process Automated by Multiple Application Components"@en ;
706
+ skos:definition
707
+ '''Detects processes assigned to more than one application component. Several
708
+ components automating the same process may indicate redundant automation or unclear
709
+ application ownership of it.'''@en ;
710
+ sh:sparql [
711
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
712
+ sh:message "Process {$this} is automated by multiple application components ({?app1} and {?app2}). Clarify which component is authoritative."@en ;
713
+ sh:select """
714
+ SELECT $this ?app1 ?app2
715
+ WHERE {
716
+ $this a am4:Process .
717
+ ?app1 a am4:ApplicationComponent ;
718
+ am4:assignedTo $this .
719
+ ?app2 a am4:ApplicationComponent ;
720
+ am4:assignedTo $this .
721
+ FILTER(STR(?app1) < STR(?app2))
722
+ }
723
+ """ ;
724
+ ] ;
725
+ .
726
+
727
+ :FunctionAutomatedByMultipleApplicationsShape
728
+ a sh:NodeShape ;
729
+ sh:targetClass am4:Function ;
730
+ sh:severity sh:Warning ;
731
+ skos:prefLabel "Function Automated by Multiple Application Components"@en ;
732
+ skos:definition
733
+ '''Detects functions assigned to more than one application component. Several
734
+ components automating the same function may indicate redundant automation or unclear
735
+ application ownership of it.'''@en ;
736
+ sh:sparql [
737
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
738
+ sh:message "Function {$this} is automated by multiple application components ({?app1} and {?app2}). Clarify which component is authoritative."@en ;
739
+ sh:select """
740
+ SELECT $this ?app1 ?app2
741
+ WHERE {
742
+ $this a am4:Function .
743
+ ?app1 a am4:ApplicationComponent ;
744
+ am4:assignedTo $this .
745
+ ?app2 a am4:ApplicationComponent ;
746
+ am4:assignedTo $this .
747
+ FILTER(STR(?app1) < STR(?app2))
748
+ }
749
+ """ ;
750
+ ] ;
751
+ .
752
+
753
+ :OrphanedElementShape
754
+ a sh:NodeShape ;
755
+ # ArchiMate 4.0's elements only — the roots am4elsh:ArchiMateElementShape targets, and
756
+ # the junctions — not arch:Element: in a graph holding other notations' models, or
757
+ # ArchiMate 3.2's beside 4.0's, this rule would judge their elements too, and an
758
+ # element would be reported once for each ArchiMate version loaded.
759
+ sh:targetClass am4:BusinessDomainElement ,
760
+ am4:ApplicationDomainElement ,
761
+ am4:TechnologyDomainElement ,
762
+ am4:ImplementationAndMigrationDomainElement ,
763
+ am4:CommonDomainElement ,
764
+ am4:StrategyElement ,
765
+ am4:MotivationElement ,
766
+ am4:BehaviorElement ,
767
+ am4:StructureElement ,
768
+ am4:CompositeElement ,
769
+ am4:AndJunction ,
770
+ am4:OrJunction ;
771
+ sh:severity sh:Info ;
772
+ skos:prefLabel "Orphaned Element"@en ;
773
+ skos:definition
774
+ '''Elements with no relationships to other elements may be
775
+ orphaned or incompletely modeled. Every element should
776
+ participate in at least one relationship.'''@en ;
777
+ sh:sparql [
778
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
779
+ sh:message "Element {$this} has no relationships to any other element."@en ;
780
+ sh:select """
781
+ SELECT $this
782
+ WHERE {
783
+ $this a/rdfs:subClassOf* arch:Element .
784
+ # MINUS, not FILTER NOT EXISTS: the same results, without testing every
785
+ # element against every other one — which grows with the square of the model.
786
+ MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
787
+ MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
788
+ }
789
+ """ ;
790
+ ] ;
791
+ .
792
+
793
+
794
+ #################################################################
795
+ #
796
+ # CATEGORY 9: MOTIVATION ALIGNMENT
797
+ #
798
+ # Principle: Architecture elements should be traceable to business
799
+ # goals and requirements. Untraceable elements may lack business
800
+ # justification.
801
+ #
802
+ #################################################################
803
+
804
+ :CapabilityWithoutGoalShape
805
+ a sh:NodeShape ;
806
+ sh:targetClass am4:Capability ;
807
+ sh:severity sh:Info ;
808
+ skos:prefLabel "Capability Without Goal"@en ;
809
+ skos:definition
810
+ '''Capabilities should be linked to at least one goal or
811
+ outcome — realizing it, influencing it or associated with it —
812
+ to establish business justification.'''@en ;
813
+ sh:sparql [
814
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
815
+ sh:message "Capability {$this} is not linked to any goal or outcome."@en ;
816
+ sh:select """
817
+ SELECT $this
818
+ WHERE {
819
+ $this a am4:Capability .
820
+ FILTER NOT EXISTS {
821
+ {
822
+ $this am4:realizes ?goal .
823
+ { ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
824
+ } UNION {
825
+ $this am4:influences ?goal .
826
+ { ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
827
+ } UNION {
828
+ $this am4:associatedWith ?goal .
829
+ { ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
830
+ }
831
+ }
832
+ }
833
+ """ ;
834
+ ] ;
835
+ .
836
+
837
+ :RequirementWithoutRealizationShape
838
+ a sh:NodeShape ;
839
+ sh:targetClass am4:Requirement ;
840
+ sh:severity sh:Warning ;
841
+ skos:prefLabel "Requirement Without Realization"@en ;
842
+ skos:definition
843
+ '''Requirements should be realized by at least one core element.
844
+ Unrealized requirements indicate gaps in the architecture.'''@en ;
845
+ sh:sparql [
846
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
847
+ sh:message "Requirement {$this} is not realized by any architecture element."@en ;
848
+ sh:select """
849
+ SELECT $this
850
+ WHERE {
851
+ $this a am4:Requirement .
852
+ FILTER NOT EXISTS {
853
+ ?element am4:realizes $this .
854
+ FILTER NOT EXISTS {
855
+ ?element rdf:type/rdfs:subClassOf* am4:MotivationElement .
856
+ }
857
+ }
858
+ }
859
+ """ ;
860
+ ] ;
861
+ .
862
+
863
+
864
+ ## ─── Composition: multiple-parent warning ────────────────────────────────
865
+ ## ArchiMate 4 §5.1.2 defines composition as expressing an existence
866
+ ## dependency ("if a composite is deleted, its parts are deleted as well").
867
+ ## This logically implies a part should belong to at most one composite —
868
+ ## otherwise deleting one composite would destroy parts still needed by
869
+ ## another. The spec does not explicitly enforce exclusivity, but the
870
+ ## existence dependency semantics make multiple-parent composition
871
+ ## logically inconsistent. This shape emits a warning when an element
872
+ ## is the target of composition from multiple sources.
873
+
874
+ :CompositionMultipleParentWarning
875
+ a sh:NodeShape ;
876
+ sh:targetObjectsOf am4:composedOf ;
877
+ sh:severity sh:Warning ;
878
+ skos:prefLabel "Composition with Multiple Parents"@en ;
879
+ skos:definition
880
+ '''An element should be part of at most one composite: composition
881
+ is an existence dependency, so a part composed into several wholes
882
+ would be deleted with each of them.'''@en ;
883
+ sh:sparql [
884
+ sh:prefixes <https://meta.linked.archi/archimate4/principle-shapes#> ;
885
+ sh:message "Element {$this} is composed into multiple parents via am4:composedOf. Composition implies existence dependency — a part with multiple composites may indicate a modelling issue (ArchiMate 4 §5.1.2)."@en ;
886
+ sh:select """
887
+ SELECT $this (COUNT(?parent) AS ?parentCount)
888
+ WHERE {
889
+ ?parent am4:composedOf $this .
890
+ }
891
+ GROUP BY $this
892
+ HAVING (COUNT(?parent) > 1)
893
+ """ ;
894
+ ] ;
895
+ .