@linked.archi/kernel 0.0.0-stage → 0.1.5

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 (365) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +11 -0
  3. package/README.md +96 -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 +923 -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 +893 -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 +7302 -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 +840 -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 +470 -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/observable-store.ts +631 -0
  353. package/src/rdf-engine/rdf-store.ts +508 -0
  354. package/src/rdf-engine/shacl-validator.ts +602 -0
  355. package/src/rdf-engine/shape-reach.ts +140 -0
  356. package/src/rdf-engine/shape-switches.ts +165 -0
  357. package/src/rdf-engine/single-valued.ts +219 -0
  358. package/src/rdf-engine/sparql-constraints.ts +334 -0
  359. package/src/rdf-engine/term-codec.ts +51 -0
  360. package/src/rdf-engine/ttl-parser.ts +51 -0
  361. package/src/rdf-engine/ttl-serializer.ts +79 -0
  362. package/src/rdf-engine/turtle-writer.ts +284 -0
  363. package/src/rdf-engine/validation-engine.ts +682 -0
  364. package/src/rdf-engine/validation-service.ts +184 -0
  365. package/src/rdf-engine/validation.worker.ts +47 -0
@@ -0,0 +1,426 @@
1
+ /**
2
+ * Reading and writing a model — only the model, never the metamodel.
3
+ *
4
+ * ## At rest vs. at runtime
5
+ *
6
+ * At runtime the model is the store's default graph (see
7
+ * `model-manager/model-queries.ts`). At rest it follows the published layout
8
+ * (DD-15 in the Linked.Archi design decisions) when the format can carry graphs:
9
+ *
10
+ * ```
11
+ * {ns}graph/model the curated model: the arch:Model resource and its conformance, the folders, their
12
+ * list entries and each concept's place in a folder
13
+ * {ns}graph/semantic elements, relationships, views, membership
14
+ * {ns}graph/views arch-vis geometry only — droppable on its own
15
+ * {ns}graph/provenance how it came to be: a converter's run, la-gram's editing activities (DD-27), and what
16
+ * replaced what — a former name's `owl:sameAs`, `dcterms:replaces`, `dcterms:isReplacedBy`
17
+ * ```
18
+ *
19
+ * The graphs hold what the converters put in them, so that a converted model opened and saved keeps each
20
+ * statement in its graph (KD-24).
21
+ *
22
+ * `{ns}` is the model's namespace, `{base}{notation}/{modelId}/`, so the graph
23
+ * IRIs are exactly DD-15's. The same namespace is written as the `m:` prefix
24
+ * (or whatever prefix the model declares), with a prefix per kind and per view
25
+ * derived from it, and what no prefix fits relative to `@base` (DD-41,
26
+ * `rdf-engine/turtle-writer.ts`): the Turtle reads `m:element-…`, `me:…` and
27
+ * `mv…:node-…` rather than full IRIs.
28
+ *
29
+ * TriG, N-Quads and JSON-LD get that partition. Turtle, N-Triples and RDF/XML
30
+ * cannot name graphs, so they get the union; `arch:inModel` on every concept is
31
+ * what keeps membership recoverable there, which is why the model layer always
32
+ * writes it.
33
+ *
34
+ * ## Profiles
35
+ *
36
+ * `no-geometry` drops the views graph — the diagrams survive as `arch:View`
37
+ * resources with `arch:inView` membership, only the coordinates go. That is the
38
+ * profile to hand to a pipeline that reasons over the architecture and has no
39
+ * use for layout.
40
+ *
41
+ * ## Loading
42
+ *
43
+ * Every quad of a loaded file goes into the default graph, whatever graph it
44
+ * came in: a model is edited as one graph, and re-partitioned on save.
45
+ */
46
+
47
+ import { Writer as N3Writer, DataFactory, Parser as N3Parser } from 'n3';
48
+ import type { Quad } from '@rdfjs/types';
49
+ import * as oxigraph from 'oxigraph';
50
+ import type { PrefixMap, RdfStore } from '../rdf-engine/interfaces.js';
51
+ import { NAMESPACES, PREFIXES } from '../rdf-engine/namespaces.js';
52
+ import { detectFormat, parseRdf, type AssetFormat } from '../metamodel-manager/asset-sources.js';
53
+ import { SCHEMA_ITEM_LIST_ELEMENT, modelQuads } from '../model-manager/model-queries.js';
54
+ import { readModelNamespace } from '../model-manager/model-namespace.js';
55
+ import { ensureNamespace } from '../rdf-engine/iri.js';
56
+ import { KIND_PREFIXES, writeTurtle } from '../rdf-engine/turtle-writer.js';
57
+ import { IRI, nn } from '../model-manager/vocabulary.js';
58
+ import { isProvenanceStatement, provenanceSubjects } from '../model-manager/provenance.js';
59
+
60
+ /** File formats a model can be saved in. */
61
+ export type ModelFormat = 'turtle' | 'trig' | 'n-triples' | 'n-quads' | 'json-ld' | 'rdf-xml';
62
+
63
+ /** Descriptor of a {@link ModelFormat}. */
64
+ export interface ModelFormatInfo {
65
+ id: ModelFormat;
66
+ label: string;
67
+ mediaType: AssetFormat;
68
+ extension: string;
69
+ /** Whether the format carries named graphs (and so the DD-15 partition). */
70
+ graphs: boolean;
71
+ }
72
+
73
+ /** Every supported format, Turtle first (the default). */
74
+ export const MODEL_FORMATS: readonly ModelFormatInfo[] = [
75
+ { id: 'turtle', label: 'Turtle', mediaType: 'text/turtle', extension: 'ttl', graphs: false },
76
+ { id: 'trig', label: 'TriG (graph per layer)', mediaType: 'application/trig', extension: 'trig', graphs: true },
77
+ { id: 'json-ld', label: 'JSON-LD', mediaType: 'application/ld+json', extension: 'jsonld', graphs: true },
78
+ { id: 'n-quads', label: 'N-Quads', mediaType: 'application/n-quads', extension: 'nq', graphs: true },
79
+ { id: 'n-triples', label: 'N-Triples', mediaType: 'application/n-triples', extension: 'nt', graphs: false },
80
+ { id: 'rdf-xml', label: 'RDF/XML', mediaType: 'application/rdf+xml', extension: 'rdf', graphs: false },
81
+ ];
82
+
83
+ /** Look a format up by id. */
84
+ export function formatInfo(id: ModelFormat): ModelFormatInfo {
85
+ return MODEL_FORMATS.find((f) => f.id === id) ?? MODEL_FORMATS[0];
86
+ }
87
+
88
+ /** Which subset of the model to write. */
89
+ export type SerializationProfile = 'full' | 'no-geometry';
90
+
91
+ /** Options for {@link ModelIO.serialize}. */
92
+ export interface SerializeOptions {
93
+ format?: ModelFormat;
94
+ profile?: SerializationProfile;
95
+ /** Whether to write the provenance (`{ns}graph/provenance`): yes unless `false` — the RDF panel's switch. */
96
+ provenance?: boolean;
97
+ /** Extra prefixes on top of the derived ones. */
98
+ prefixes?: PrefixMap;
99
+ /**
100
+ * Only these statements — a view's, a concept's (`model-manager/rdf-scope.ts`)
101
+ * — written as the whole model would be: the same prefixes, order and graphs.
102
+ */
103
+ quads?: Quad[];
104
+ }
105
+
106
+ /** The DD-15 partition of a model. */
107
+ export interface ModelPartition {
108
+ model: Quad[];
109
+ semantic: Quad[];
110
+ views: Quad[];
111
+ provenance: Quad[];
112
+ }
113
+
114
+ /**
115
+ * What places a statement in the model graph or the provenance graph beyond its own terms (KD-24): the
116
+ * model's folders and their list entries, and the names it no longer uses.
117
+ */
118
+ export interface PartitionContext {
119
+ /** The `arch:Folder` resources. */
120
+ folders: ReadonlySet<string>;
121
+ /** The folders' list entries: what a folder's `schema:itemListElement` names, a resource or a blank node. */
122
+ listEntries: ReadonlySet<string>;
123
+ /** Former names: what a `dcterms:isReplacedBy` says is replaced, and what a `dcterms:replaces` names. */
124
+ formerNames: ReadonlySet<string>;
125
+ }
126
+
127
+ const OWL_SAME_AS = NAMESPACES.owl + 'sameAs';
128
+ const DCTERMS_REPLACES = NAMESPACES.dcterms + 'replaces';
129
+ const DCTERMS_IS_REPLACED_BY = NAMESPACES.dcterms + 'isReplacedBy';
130
+ const LIST_ELEMENT = new Set(SCHEMA_ITEM_LIST_ELEMENT.map((p) => p.value));
131
+
132
+ /** The {@link PartitionContext} of a set of quads: the whole model, for it to be complete. */
133
+ export function partitionContext(quads: Iterable<Quad>): PartitionContext {
134
+ const folders = new Set<string>();
135
+ const listed: Quad[] = [];
136
+ const formerNames = new Set<string>();
137
+ for (const q of quads) {
138
+ const p = q.predicate.value;
139
+ if (p === IRI.rdfType && q.object.value === IRI.Folder) folders.add(q.subject.value);
140
+ else if (LIST_ELEMENT.has(p)) listed.push(q);
141
+ else if (p === DCTERMS_IS_REPLACED_BY) formerNames.add(q.subject.value);
142
+ else if (p === DCTERMS_REPLACES) formerNames.add(q.object.value);
143
+ }
144
+ const listEntries = new Set(listed.filter((q) => folders.has(q.subject.value)).map((q) => q.object.value));
145
+ return { folders, listEntries, formerNames };
146
+ }
147
+
148
+ /**
149
+ * The {@link PartitionContext} of the store's model, read by pattern — for writing a part of the model (a
150
+ * view's statements, a selection's) in the graphs the whole would put it in: a concept's place in a folder
151
+ * is told from its other statements only by the folder's type.
152
+ */
153
+ export function storePartitionContext(store: RdfStore): PartitionContext {
154
+ const MODEL = DataFactory.defaultGraph() as never;
155
+ const subjects = (p: string, o?: string) =>
156
+ store.getQuads(null, nn(p), o ? nn(o) : null, MODEL).map((q) => q.subject.value);
157
+ const folders = new Set(subjects(IRI.rdfType, IRI.Folder));
158
+ const listEntries = new Set<string>();
159
+ for (const p of SCHEMA_ITEM_LIST_ELEMENT) {
160
+ for (const q of store.getQuads(null, p, null, MODEL)) if (folders.has(q.subject.value)) listEntries.add(q.object.value);
161
+ }
162
+ const formerNames = new Set([
163
+ ...subjects(DCTERMS_IS_REPLACED_BY),
164
+ ...store.getQuads(null, nn(DCTERMS_REPLACES), null, MODEL).map((q) => q.object.value),
165
+ ]);
166
+ return { folders, listEntries, formerNames };
167
+ }
168
+
169
+ /** Graph IRIs of the partition, in a model's namespace. */
170
+ export function partitionGraphs(namespace: string): { model: string; semantic: string; views: string; provenance: string } {
171
+ const ns = ensureNamespace(namespace);
172
+ return {
173
+ model: `${ns}graph/model`,
174
+ semantic: `${ns}graph/semantic`,
175
+ views: `${ns}graph/views`,
176
+ provenance: `${ns}graph/provenance`,
177
+ };
178
+ }
179
+
180
+ /**
181
+ * Split model quads into the DD-15 graphs.
182
+ *
183
+ * Geometry is every `arch-vis:` diagram element (by type) plus the list cells
184
+ * of their point lists (typed nothing, found by walking from `arch-vis:points`).
185
+ * The line falls around geometry, not around views: an `arch:View` is a model
186
+ * concept and stays in the semantic graph.
187
+ *
188
+ * Provenance is every PROV statement and every statement about a resource a PROV
189
+ * class types — an activity, an agent, a source entity, a bundle (DD-27): a
190
+ * converter's run, la-gram's editing activities, a derivation's activity. A
191
+ * concept's `dcterms:created` and `dcterms:modified` describe it, and stay with it.
192
+ * What replaced what is provenance too, as the converters write it: every
193
+ * `dcterms:replaces` and `dcterms:isReplacedBy`, and a former name's `owl:sameAs`
194
+ * — a model's previous IRI, a view's successor. Another `owl:sameAs` is the
195
+ * model's own statement.
196
+ *
197
+ * The model graph is the curated model (DD-15): the `arch:Model` resource, the
198
+ * folders and their list entries — every statement about them — and each
199
+ * concept's `dcterms:isPartOf` its folder. A folder is a presentation of the
200
+ * model, made by whoever arranged it, not a fact an input asserted (KD-24).
201
+ *
202
+ * `context` says which resources are folders, list entries and former names; by
203
+ * default it is read from `quads`, which must then be the whole model.
204
+ */
205
+ export function partitionModel(quads: Quad[], modelIri: string | undefined, context: PartitionContext = partitionContext(quads)): ModelPartition {
206
+ const geometry = new Set<string>();
207
+ const visTypes = new Set<string>();
208
+ for (const q of quads) {
209
+ if (q.predicate.value === IRI.rdfType && q.object.value.startsWith(NAMESPACES['arch-vis'])) {
210
+ geometry.add(q.subject.value);
211
+ visTypes.add(q.subject.value);
212
+ }
213
+ }
214
+ // Point-list cells: reachable from a diagram element's arch-vis:points.
215
+ const rest = new Map<string, string>();
216
+ for (const q of quads) if (q.predicate.value === IRI.rdfRest) rest.set(q.subject.value, q.object.value);
217
+ for (const q of quads) {
218
+ if (q.predicate.value !== IRI.points || !visTypes.has(q.subject.value)) continue;
219
+ let cell: string | undefined = q.object.value;
220
+ while (cell && cell !== IRI.rdfNil && !geometry.has(cell)) {
221
+ geometry.add(cell);
222
+ cell = rest.get(cell);
223
+ }
224
+ }
225
+
226
+ const provenance = provenanceSubjects(quads);
227
+ const { folders, listEntries, formerNames } = context;
228
+ const lineage = (q: Quad) => {
229
+ const p = q.predicate.value;
230
+ return p === DCTERMS_REPLACES || p === DCTERMS_IS_REPLACED_BY || (p === OWL_SAME_AS && formerNames.has(q.subject.value));
231
+ };
232
+ const curated = (q: Quad) =>
233
+ (!!modelIri && q.subject.value === modelIri) ||
234
+ folders.has(q.subject.value) ||
235
+ listEntries.has(q.subject.value) ||
236
+ (q.predicate.value === IRI.dctermsIsPartOf && folders.has(q.object.value));
237
+ const partition: ModelPartition = { model: [], semantic: [], views: [], provenance: [] };
238
+ for (const q of quads) {
239
+ if (geometry.has(q.subject.value)) partition.views.push(q);
240
+ else if (isProvenanceStatement(q, provenance) || lineage(q)) partition.provenance.push(q);
241
+ else if (curated(q)) partition.model.push(q);
242
+ else partition.semantic.push(q);
243
+ }
244
+ return partition;
245
+ }
246
+
247
+ /** Result of {@link ModelIO.load}. */
248
+ export interface ModelLoadResult {
249
+ quadCount: number;
250
+ format: AssetFormat;
251
+ }
252
+
253
+ /** Saves and opens models against the store's default graph. */
254
+ export class ModelIO {
255
+ constructor(private readonly store: RdfStore) {}
256
+
257
+ /** The model's quads, as they are in the store (the default graph). */
258
+ modelQuads(): Quad[] {
259
+ return modelQuads(this.store);
260
+ }
261
+
262
+ /**
263
+ * Prefixes for writing: the standard ones, every `vann:preferredNamespace…`
264
+ * pair a loaded vocabulary declares (so `am4:`, `bpmn:`, `c4:` appear without
265
+ * a hard-coded table), and `m:` (or the prefix the model declares) for the
266
+ * model's own namespace — which wins over any other binding of that prefix.
267
+ */
268
+ collectPrefixes(modelIri?: string, extra?: PrefixMap): PrefixMap {
269
+ const prefixes: PrefixMap = { ...PREFIXES };
270
+ const prefixOf = new Map<string, string>();
271
+ const uriOf = new Map<string, string>();
272
+ // Vocabularies only (named graphs): the model's own pair is handled below.
273
+ for (const q of this.store.getQuads(null, nn(NAMESPACES.vann + 'preferredNamespacePrefix'))) {
274
+ if (q.graph.termType !== 'DefaultGraph') prefixOf.set(q.subject.value, q.object.value);
275
+ }
276
+ for (const q of this.store.getQuads(null, nn(NAMESPACES.vann + 'preferredNamespaceUri'))) {
277
+ if (q.graph.termType !== 'DefaultGraph') uriOf.set(q.subject.value, q.object.value);
278
+ }
279
+ // In order of the prefix (then its namespace, for one declared twice), not of the store: the store
280
+ // returns the declarations in the order the metamodels were loaded, which is the order their files
281
+ // happened to arrive in — so the same model was written with its prefixes in another order on
282
+ // another machine, and `la-gram-git check` failed there a file written here (Req 9.12).
283
+ const declared = [...prefixOf]
284
+ .map(([subject, prefix]) => [prefix, uriOf.get(subject)] as const)
285
+ .filter((pair): pair is readonly [string, string] => !!pair[1] && /^[A-Za-z][\w-]*$/.test(pair[0]))
286
+ .sort(([a, x], [b, y]) => (a < b ? -1 : a > b ? 1 : x < y ? -1 : x > y ? 1 : 0));
287
+ for (const [prefix, uri] of declared) if (!(prefix in prefixes)) prefixes[prefix] = uri;
288
+ if (modelIri) {
289
+ const own = readModelNamespace(this.store, modelIri);
290
+ // One prefix per namespace: drop another name bound to the same IRI.
291
+ for (const [name, uri] of Object.entries(prefixes)) if (uri === own.namespace) delete prefixes[name];
292
+ prefixes[own.prefix] = own.namespace;
293
+ // A prefix per kind (DD-41) — `me:` for `{ns}element/` — so that the SPARQL tab, the history and the
294
+ // graph show the model's IRIs short as a saved file does; not one a vocabulary holds for something else.
295
+ const bound = new Set(Object.values(prefixes));
296
+ for (const [suffix, segment] of KIND_PREFIXES) {
297
+ const label = own.prefix + suffix;
298
+ const uri = own.namespace + segment;
299
+ if (!(label in prefixes) && !bound.has(uri)) prefixes[label] = uri;
300
+ }
301
+ }
302
+ return { ...prefixes, ...extra };
303
+ }
304
+
305
+ /** Serialize the model. */
306
+ serialize(modelIri: string | undefined, options: SerializeOptions = {}): string {
307
+ const format = formatInfo(options.format ?? 'turtle');
308
+ // A part of the model goes into the graphs the whole would put it in (KD-24).
309
+ const partition = options.quads
310
+ ? partitionModel(options.quads, modelIri, storePartitionContext(this.store))
311
+ : partitionModel(this.modelQuads(), modelIri);
312
+ if (options.profile === 'no-geometry') partition.views = [];
313
+ if (options.provenance === false) partition.provenance = [];
314
+
315
+ if (!format.graphs || !modelIri) {
316
+ return this.write(
317
+ [...partition.model, ...partition.semantic, ...partition.views, ...partition.provenance],
318
+ format,
319
+ modelIri,
320
+ options.prefixes,
321
+ );
322
+ }
323
+ const graphs = partitionGraphs(readModelNamespace(this.store, modelIri).namespace);
324
+ const regraph = (quads: Quad[], graph: string) =>
325
+ quads.map((q) => DataFactory.quad(q.subject as never, q.predicate as never, q.object as never, DataFactory.namedNode(graph)) as unknown as Quad);
326
+ return this.write(
327
+ [
328
+ ...regraph(partition.model, graphs.model),
329
+ ...regraph(partition.semantic, graphs.semantic),
330
+ ...regraph(partition.views, graphs.views),
331
+ ...regraph(partition.provenance, graphs.provenance),
332
+ ],
333
+ format,
334
+ modelIri,
335
+ options.prefixes,
336
+ );
337
+ }
338
+
339
+ /**
340
+ * Write any set of quads — a query's result — in a model format, with the
341
+ * same prefixes and ordering a saved model gets.
342
+ */
343
+ serializeQuads(quads: Quad[], modelIri: string | undefined, format: ModelFormat = 'turtle'): string {
344
+ return this.write(quads, formatInfo(format), modelIri);
345
+ }
346
+
347
+ /**
348
+ * Parse a file and make it the model: the current model data is replaced,
349
+ * every quad lands in the default graph.
350
+ *
351
+ * @param nameOrMediaType A file name or media type to pick the parser.
352
+ */
353
+ load(text: string, nameOrMediaType?: string): ModelLoadResult {
354
+ const format = nameOrMediaType?.includes('/')
355
+ ? detectFormat(nameOrMediaType)
356
+ : detectFormat(null, nameOrMediaType);
357
+ const quads = parseModelText(text, format);
358
+ const current = this.modelQuads();
359
+ if (current.length > 0) this.store.removeQuads(current);
360
+ const flat = quads.map(
361
+ (q) => DataFactory.quad(q.subject as never, q.predicate as never, q.object as never) as unknown as Quad,
362
+ );
363
+ this.store.addQuads(flat);
364
+ return { quadCount: flat.length, format };
365
+ }
366
+
367
+ private write(quads: Quad[], format: ModelFormatInfo, modelIri: string | undefined, extra?: PrefixMap): string {
368
+ const sorted = [...quads].sort(compareQuads);
369
+ if (format.id === 'turtle' || format.id === 'trig') {
370
+ // The model's IRIs written short as DD-41 says — a prefix per kind and per view, then relative to
371
+ // `@base` — and every other prefix only where an IRI uses it.
372
+ const own = modelIri ? readModelNamespace(this.store, modelIri) : undefined;
373
+ return writeTurtle(sorted, {
374
+ prefixes: this.collectPrefixes(modelIri, extra),
375
+ onlyUsed: true,
376
+ ...(own ? { model: { namespace: own.namespace, prefix: own.prefix } } : {}),
377
+ format: format.id === 'trig' ? 'application/trig' : 'text/turtle',
378
+ });
379
+ }
380
+ // The rest through Oxigraph's serializers, which cover JSON-LD and RDF/XML.
381
+ // JSON-LD has no RDF 1.2 triple terms: the `rdf:reifies` a qualified
382
+ // relationship carries is left out of it — it follows from the relationship's
383
+ // ends and class, and loading the model puts it back (`ModelSession.adopt`).
384
+ const expressible = format.id === 'json-ld' ? sorted.filter((q) => q.object.termType !== 'Quad') : sorted;
385
+ const scratch = new oxigraph.Store();
386
+ const nquads = new N3Writer({ format: 'application/n-quads' });
387
+ for (const q of expressible) nquads.addQuad(q as never);
388
+ let text = '';
389
+ nquads.end((_err: Error | null, result: string) => {
390
+ text = result ?? '';
391
+ });
392
+ scratch.load(text, { format: 'application/n-quads' });
393
+ return scratch.dump({
394
+ format: format.mediaType,
395
+ ...(format.graphs ? {} : { from_graph_name: oxigraph.defaultGraph() }),
396
+ });
397
+ }
398
+ }
399
+
400
+ /** The format a path's extension names (`models/shop.ttl` → Turtle), or `undefined`. */
401
+ export function formatOfPath(path: string): ModelFormat | undefined {
402
+ const extension = /\.([A-Za-z0-9]+)$/.exec(path)?.[1]?.toLowerCase();
403
+ return extension ? MODEL_FORMATS.find((f) => f.extension === extension)?.id : undefined;
404
+ }
405
+
406
+ /** Parse any supported model format into quads. */
407
+ export function parseModelText(text: string, format: AssetFormat): Quad[] {
408
+ if (format === 'application/ld+json' || format === 'application/rdf+xml') return parseRdf(text, format);
409
+ return new N3Parser({ format }).parse(text) as unknown as Quad[];
410
+ }
411
+
412
+ /** Graph, then subject, then `rdf:type` before other predicates, then object — deterministic output (Req 9.12). */
413
+ function compareQuads(a: Quad, b: Quad): number {
414
+ return (
415
+ cmp(a.graph.value, b.graph.value) ||
416
+ cmp(a.subject.value, b.subject.value) ||
417
+ // `a …` leads each subject's statements, as Turtle is written by hand.
418
+ Number(b.predicate.value === IRI.rdfType) - Number(a.predicate.value === IRI.rdfType) ||
419
+ cmp(a.predicate.value, b.predicate.value) ||
420
+ cmp(a.object.value, b.object.value)
421
+ );
422
+ }
423
+
424
+ function cmp(a: string, b: string): number {
425
+ return a < b ? -1 : a > b ? 1 : 0;
426
+ }
package/src/index.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @linked.archi/kernel — provisional entry (K01).
3
+ *
4
+ * Each module is exported as a namespace, so names the modules share do not clash. Until K02 freezes
5
+ * the public API from what the workspace and la-gram call, consumers may also import any module file
6
+ * by its path, `@linked.archi/kernel/model-manager/model-diff.js` (KD-5).
7
+ */
8
+ export * as rdfEngine from './rdf-engine/index.js';
9
+ export * as metamodelManager from './metamodel-manager/index.js';
10
+ export * as modelManager from './model-manager/index.js';
11
+ export * as modelIo from './import-export/model-io.js';