@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.
- package/LICENSE +202 -0
- package/NOTICE +11 -0
- package/README.md +102 -2
- package/assets/arch-decision/arch-decision-metamodel.ttl +44 -0
- package/assets/arch-decision/arch-decision-onto.ttl +1566 -0
- package/assets/arch-decision/arch-decision-shapes.ttl +582 -0
- package/assets/arch-decision/arch-decision-tax.ttl +129 -0
- package/assets/arch-processes/arch-processes-metamodel.ttl +42 -0
- package/assets/arch-processes/arch-processes-tax.ttl +136 -0
- package/assets/arch-processes/archProcesses-shapes.ttl +189 -0
- package/assets/arch-processes/archProcesses.ttl +953 -0
- package/assets/archimate3/archimate3.2-element-shapes.ttl +379 -0
- package/assets/archimate3/archimate3.2-metamodel.ttl +205 -0
- package/assets/archimate3/archimate3.2-notation.ttl +1503 -0
- package/assets/archimate3/archimate3.2-onto.ttl +1579 -0
- package/assets/archimate3/archimate3.2-presentation-contexts.ttl +90 -0
- package/assets/archimate3/archimate3.2-principle-shapes.ttl +917 -0
- package/assets/archimate3/archimate3.2-questions.ttl +1125 -0
- package/assets/archimate3/archimate3.2-reference-data.ttl +74 -0
- package/assets/archimate3/archimate3.2-relationship-shapes.ttl +30956 -0
- package/assets/archimate3/archimate3.2-relationship-tables.ttl +5992 -0
- package/assets/archimate3/archimate3.2-tax.ttl +724 -0
- package/assets/archimate3/archimate3.2-viewpoint-shapes.ttl +59 -0
- package/assets/archimate3/archimate3.2-viewpoints.ttl +793 -0
- package/assets/archimate3/icons/and-junction.svg +3 -0
- package/assets/archimate3/icons/application-collaboration.svg +22 -0
- package/assets/archimate3/icons/application-component.svg +18 -0
- package/assets/archimate3/icons/application-event.svg +15 -0
- package/assets/archimate3/icons/application-function.svg +14 -0
- package/assets/archimate3/icons/application-interaction.svg +17 -0
- package/assets/archimate3/icons/application-interface.svg +16 -0
- package/assets/archimate3/icons/application-process.svg +14 -0
- package/assets/archimate3/icons/application-service.svg +14 -0
- package/assets/archimate3/icons/artifact.svg +16 -0
- package/assets/archimate3/icons/assessment.svg +17 -0
- package/assets/archimate3/icons/business-actor.svg +22 -0
- package/assets/archimate3/icons/business-collaboration.svg +21 -0
- package/assets/archimate3/icons/business-event.svg +15 -0
- package/assets/archimate3/icons/business-function.svg +14 -0
- package/assets/archimate3/icons/business-interaction.svg +18 -0
- package/assets/archimate3/icons/business-interface.svg +16 -0
- package/assets/archimate3/icons/business-object.svg +14 -0
- package/assets/archimate3/icons/business-process.svg +15 -0
- package/assets/archimate3/icons/business-role.svg +16 -0
- package/assets/archimate3/icons/business-service.svg +14 -0
- package/assets/archimate3/icons/capability.svg +40 -0
- package/assets/archimate3/icons/communication-network.svg +18 -0
- package/assets/archimate3/icons/constraint.svg +18 -0
- package/assets/archimate3/icons/contract.svg +13 -0
- package/assets/archimate3/icons/course-of-action.svg +20 -0
- package/assets/archimate3/icons/data-object.svg +14 -0
- package/assets/archimate3/icons/deliverable.svg +11 -0
- package/assets/archimate3/icons/device.svg +18 -0
- package/assets/archimate3/icons/distribution-network.svg +19 -0
- package/assets/archimate3/icons/driver.svg +24 -0
- package/assets/archimate3/icons/equipment.svg +31 -0
- package/assets/archimate3/icons/facility.svg +16 -0
- package/assets/archimate3/icons/gap.svg +22 -0
- package/assets/archimate3/icons/glyphs/activity.svg +3 -0
- package/assets/archimate3/icons/glyphs/actor.svg +14 -0
- package/assets/archimate3/icons/glyphs/application-component.svg +12 -0
- package/assets/archimate3/icons/glyphs/artifact.svg +9 -0
- package/assets/archimate3/icons/glyphs/assessment.svg +9 -0
- package/assets/archimate3/icons/glyphs/capability.svg +32 -0
- package/assets/archimate3/icons/glyphs/cloud-gear.svg +3 -0
- package/assets/archimate3/icons/glyphs/collaboration.svg +15 -0
- package/assets/archimate3/icons/glyphs/communication-network.svg +12 -0
- package/assets/archimate3/icons/glyphs/constraint.svg +10 -0
- package/assets/archimate3/icons/glyphs/contract.svg +5 -0
- package/assets/archimate3/icons/glyphs/course-of-action.svg +12 -0
- package/assets/archimate3/icons/glyphs/data-object.svg +4 -0
- package/assets/archimate3/icons/glyphs/deliverable.svg +3 -0
- package/assets/archimate3/icons/glyphs/device.svg +10 -0
- package/assets/archimate3/icons/glyphs/distribution-network.svg +11 -0
- package/assets/archimate3/icons/glyphs/driver.svg +16 -0
- package/assets/archimate3/icons/glyphs/equipment.svg +22 -0
- package/assets/archimate3/icons/glyphs/event.svg +6 -0
- package/assets/archimate3/icons/glyphs/facility.svg +7 -0
- package/assets/archimate3/icons/glyphs/function.svg +6 -0
- package/assets/archimate3/icons/glyphs/gap.svg +14 -0
- package/assets/archimate3/icons/glyphs/goal.svg +10 -0
- package/assets/archimate3/icons/glyphs/grouping.svg +4 -0
- package/assets/archimate3/icons/glyphs/interaction.svg +10 -0
- package/assets/archimate3/icons/glyphs/interface.svg +8 -0
- package/assets/archimate3/icons/glyphs/location.svg +6 -0
- package/assets/archimate3/icons/glyphs/material.svg +12 -0
- package/assets/archimate3/icons/glyphs/meaning.svg +3 -0
- package/assets/archimate3/icons/glyphs/node.svg +8 -0
- package/assets/archimate3/icons/glyphs/object.svg +4 -0
- package/assets/archimate3/icons/glyphs/outcome.svg +16 -0
- package/assets/archimate3/icons/glyphs/path.svg +10 -0
- package/assets/archimate3/icons/glyphs/person-silhouette.svg +3 -0
- package/assets/archimate3/icons/glyphs/plateau.svg +8 -0
- package/assets/archimate3/icons/glyphs/principle.svg +12 -0
- package/assets/archimate3/icons/glyphs/process.svg +6 -0
- package/assets/archimate3/icons/glyphs/product.svg +4 -0
- package/assets/archimate3/icons/glyphs/representation.svg +4 -0
- package/assets/archimate3/icons/glyphs/requirement.svg +6 -0
- package/assets/archimate3/icons/glyphs/resource.svg +14 -0
- package/assets/archimate3/icons/glyphs/role.svg +6 -0
- package/assets/archimate3/icons/glyphs/service.svg +6 -0
- package/assets/archimate3/icons/glyphs/stakeholder.svg +6 -0
- package/assets/archimate3/icons/glyphs/system-software.svg +14 -0
- package/assets/archimate3/icons/glyphs/value-stream.svg +3 -0
- package/assets/archimate3/icons/glyphs/value.svg +3 -0
- package/assets/archimate3/icons/glyphs/work-package.svg +4 -0
- package/assets/archimate3/icons/goal.svg +18 -0
- package/assets/archimate3/icons/grouping.svg +12 -0
- package/assets/archimate3/icons/implementation-event.svg +15 -0
- package/assets/archimate3/icons/location.svg +14 -0
- package/assets/archimate3/icons/material.svg +21 -0
- package/assets/archimate3/icons/meaning.svg +11 -0
- package/assets/archimate3/icons/node.svg +14 -0
- package/assets/archimate3/icons/or-junction.svg +3 -0
- package/assets/archimate3/icons/outcome.svg +25 -0
- package/assets/archimate3/icons/path.svg +18 -0
- package/assets/archimate3/icons/plateau.svg +16 -0
- package/assets/archimate3/icons/principle.svg +21 -0
- package/assets/archimate3/icons/product.svg +12 -0
- package/assets/archimate3/icons/representation.svg +12 -0
- package/assets/archimate3/icons/requirement.svg +14 -0
- package/assets/archimate3/icons/resource.svg +23 -0
- package/assets/archimate3/icons/stakeholder.svg +15 -0
- package/assets/archimate3/icons/system-software.svg +22 -0
- package/assets/archimate3/icons/technology-collaboration.svg +22 -0
- package/assets/archimate3/icons/technology-event.svg +15 -0
- package/assets/archimate3/icons/technology-function.svg +14 -0
- package/assets/archimate3/icons/technology-interaction.svg +18 -0
- package/assets/archimate3/icons/technology-interface.svg +16 -0
- package/assets/archimate3/icons/technology-process.svg +14 -0
- package/assets/archimate3/icons/technology-service.svg +14 -0
- package/assets/archimate3/icons/value-stream.svg +11 -0
- package/assets/archimate3/icons/value.svg +11 -0
- package/assets/archimate3/icons/work-package.svg +12 -0
- package/assets/archimate4/archimate4-element-shapes.ttl +404 -0
- package/assets/archimate4/archimate4-metamodel.ttl +179 -0
- package/assets/archimate4/archimate4-notation.ttl +1147 -0
- package/assets/archimate4/archimate4-onto.ttl +1559 -0
- package/assets/archimate4/archimate4-presentation-contexts.ttl +60 -0
- package/assets/archimate4/archimate4-principle-shapes.ttl +895 -0
- package/assets/archimate4/archimate4-questions.ttl +1224 -0
- package/assets/archimate4/archimate4-reference-data.ttl +56 -0
- package/assets/archimate4/archimate4-relationship-shapes.ttl +16920 -0
- package/assets/archimate4/archimate4-relationship-tables.ttl +3200 -0
- package/assets/archimate4/archimate4-tax.ttl +749 -0
- package/assets/archimate4/archimate4-viewpoint-shapes.ttl +55 -0
- package/assets/archimate4/archimate4-viewpoints.ttl +777 -0
- package/assets/archimate4/icons/and-junction.svg +3 -0
- package/assets/archimate4/icons/application-component.svg +18 -0
- package/assets/archimate4/icons/application-interface.svg +16 -0
- package/assets/archimate4/icons/artifact.svg +16 -0
- package/assets/archimate4/icons/assessment.svg +17 -0
- package/assets/archimate4/icons/business-actor.svg +22 -0
- package/assets/archimate4/icons/business-interface.svg +16 -0
- package/assets/archimate4/icons/business-object.svg +14 -0
- package/assets/archimate4/icons/capability.svg +40 -0
- package/assets/archimate4/icons/collaboration.svg +21 -0
- package/assets/archimate4/icons/communication-network.svg +18 -0
- package/assets/archimate4/icons/course-of-action.svg +20 -0
- package/assets/archimate4/icons/data-object.svg +14 -0
- package/assets/archimate4/icons/deliverable.svg +11 -0
- package/assets/archimate4/icons/device.svg +18 -0
- package/assets/archimate4/icons/distribution-network.svg +19 -0
- package/assets/archimate4/icons/driver.svg +24 -0
- package/assets/archimate4/icons/equipment.svg +31 -0
- package/assets/archimate4/icons/event.svg +15 -0
- package/assets/archimate4/icons/facility.svg +16 -0
- package/assets/archimate4/icons/function.svg +13 -0
- package/assets/archimate4/icons/glyphs/activity.svg +3 -0
- package/assets/archimate4/icons/glyphs/actor.svg +14 -0
- package/assets/archimate4/icons/glyphs/application-component.svg +12 -0
- package/assets/archimate4/icons/glyphs/artifact.svg +9 -0
- package/assets/archimate4/icons/glyphs/assessment.svg +9 -0
- package/assets/archimate4/icons/glyphs/capability.svg +32 -0
- package/assets/archimate4/icons/glyphs/cloud-gear.svg +3 -0
- package/assets/archimate4/icons/glyphs/collaboration.svg +15 -0
- package/assets/archimate4/icons/glyphs/communication-network.svg +12 -0
- package/assets/archimate4/icons/glyphs/constraint.svg +10 -0
- package/assets/archimate4/icons/glyphs/contract.svg +5 -0
- package/assets/archimate4/icons/glyphs/course-of-action.svg +12 -0
- package/assets/archimate4/icons/glyphs/data-object.svg +4 -0
- package/assets/archimate4/icons/glyphs/deliverable.svg +3 -0
- package/assets/archimate4/icons/glyphs/device.svg +10 -0
- package/assets/archimate4/icons/glyphs/distribution-network.svg +11 -0
- package/assets/archimate4/icons/glyphs/driver.svg +16 -0
- package/assets/archimate4/icons/glyphs/equipment.svg +22 -0
- package/assets/archimate4/icons/glyphs/event.svg +6 -0
- package/assets/archimate4/icons/glyphs/facility.svg +7 -0
- package/assets/archimate4/icons/glyphs/function.svg +6 -0
- package/assets/archimate4/icons/glyphs/gap.svg +14 -0
- package/assets/archimate4/icons/glyphs/goal.svg +10 -0
- package/assets/archimate4/icons/glyphs/grouping.svg +4 -0
- package/assets/archimate4/icons/glyphs/interaction.svg +10 -0
- package/assets/archimate4/icons/glyphs/interface.svg +8 -0
- package/assets/archimate4/icons/glyphs/location.svg +6 -0
- package/assets/archimate4/icons/glyphs/material.svg +12 -0
- package/assets/archimate4/icons/glyphs/meaning.svg +3 -0
- package/assets/archimate4/icons/glyphs/node.svg +8 -0
- package/assets/archimate4/icons/glyphs/object.svg +4 -0
- package/assets/archimate4/icons/glyphs/outcome.svg +16 -0
- package/assets/archimate4/icons/glyphs/path.svg +10 -0
- package/assets/archimate4/icons/glyphs/person-silhouette.svg +3 -0
- package/assets/archimate4/icons/glyphs/plateau.svg +8 -0
- package/assets/archimate4/icons/glyphs/principle.svg +12 -0
- package/assets/archimate4/icons/glyphs/process.svg +6 -0
- package/assets/archimate4/icons/glyphs/product.svg +4 -0
- package/assets/archimate4/icons/glyphs/representation.svg +4 -0
- package/assets/archimate4/icons/glyphs/requirement.svg +6 -0
- package/assets/archimate4/icons/glyphs/resource.svg +14 -0
- package/assets/archimate4/icons/glyphs/role.svg +6 -0
- package/assets/archimate4/icons/glyphs/service.svg +6 -0
- package/assets/archimate4/icons/glyphs/stakeholder.svg +6 -0
- package/assets/archimate4/icons/glyphs/system-software.svg +14 -0
- package/assets/archimate4/icons/glyphs/value-stream.svg +3 -0
- package/assets/archimate4/icons/glyphs/value.svg +3 -0
- package/assets/archimate4/icons/glyphs/work-package.svg +4 -0
- package/assets/archimate4/icons/goal.svg +18 -0
- package/assets/archimate4/icons/grouping.svg +12 -0
- package/assets/archimate4/icons/location.svg +14 -0
- package/assets/archimate4/icons/material.svg +21 -0
- package/assets/archimate4/icons/meaning.svg +11 -0
- package/assets/archimate4/icons/node.svg +14 -0
- package/assets/archimate4/icons/or-junction.svg +3 -0
- package/assets/archimate4/icons/outcome.svg +25 -0
- package/assets/archimate4/icons/path.svg +18 -0
- package/assets/archimate4/icons/plateau.svg +16 -0
- package/assets/archimate4/icons/principle.svg +21 -0
- package/assets/archimate4/icons/process.svg +15 -0
- package/assets/archimate4/icons/product.svg +12 -0
- package/assets/archimate4/icons/requirement.svg +14 -0
- package/assets/archimate4/icons/resource.svg +23 -0
- package/assets/archimate4/icons/role.svg +16 -0
- package/assets/archimate4/icons/service.svg +13 -0
- package/assets/archimate4/icons/stakeholder.svg +15 -0
- package/assets/archimate4/icons/system-software.svg +22 -0
- package/assets/archimate4/icons/technology-interface.svg +16 -0
- package/assets/archimate4/icons/value-stream.svg +11 -0
- package/assets/archimate4/icons/value.svg +11 -0
- package/assets/archimate4/icons/work-package.svg +12 -0
- package/assets/basic/basic-metamodel.ttl +100 -0
- package/assets/basic/basic-notation-bubble.ttl +175 -0
- package/assets/basic/basic-notation.ttl +172 -0
- package/assets/basic/basic-onto.ttl +171 -0
- package/assets/basic/basic-presentation-contexts.ttl +70 -0
- package/assets/basic/basic-tax.ttl +130 -0
- package/assets/basic/icons/aggregation.svg +7 -0
- package/assets/basic/icons/association.svg +6 -0
- package/assets/basic/icons/element.svg +5 -0
- package/assets/basic/icons/glyphs/aggregation.svg +6 -0
- package/assets/basic/icons/glyphs/association.svg +5 -0
- package/assets/basic/icons/glyphs/element.svg +5 -0
- package/assets/basic/icons/glyphs/relationship.svg +5 -0
- package/assets/basic/icons/relationship.svg +7 -0
- package/assets/basic/notation-bubble/icons/aggregation.svg +7 -0
- package/assets/basic/notation-bubble/icons/association.svg +6 -0
- package/assets/basic/notation-bubble/icons/element.svg +5 -0
- package/assets/basic/notation-bubble/icons/glyphs/aggregation.svg +6 -0
- package/assets/basic/notation-bubble/icons/glyphs/association.svg +5 -0
- package/assets/basic/notation-bubble/icons/glyphs/element.svg +5 -0
- package/assets/basic/notation-bubble/icons/glyphs/relationship.svg +5 -0
- package/assets/basic/notation-bubble/icons/relationship.svg +7 -0
- package/assets/catalog.ttl +7406 -0
- package/assets/core/core-notation.ttl +131 -0
- package/assets/core/core-onto.ttl +2811 -0
- package/assets/core/core-questions.ttl +957 -0
- package/assets/core/core-shapes.ttl +915 -0
- package/assets/core/core-vis-onto.ttl +1408 -0
- package/assets/core/core-vis-shapes.ttl +851 -0
- package/assets/core-vis/markers/circle-dot.svg +3 -0
- package/assets/core-vis/markers/closed-arrowhead.svg +3 -0
- package/assets/core-vis/markers/filled-diamond.svg +3 -0
- package/assets/core-vis/markers/half-arrowhead.svg +3 -0
- package/assets/core-vis/markers/hollow-arrowhead.svg +3 -0
- package/assets/core-vis/markers/hollow-diamond.svg +3 -0
- package/assets/core-vis/markers/open-arrowhead.svg +3 -0
- package/fixtures/interoperability/archimate4-demo.trig +259 -0
- package/fixtures/interoperability/expected-findings.json +26 -0
- package/fixtures/interoperability/shop-seed.ttl +225 -0
- package/package.json +136 -4
- package/scripts/sync-assets.mjs +252 -0
- package/src/conformance.ts +66 -0
- package/src/import-export/model-io.ts +426 -0
- package/src/index.ts +11 -0
- package/src/metamodel-manager/asset-sources.ts +754 -0
- package/src/metamodel-manager/bundled-assets.ts +599 -0
- package/src/metamodel-manager/catalogue.ts +114 -0
- package/src/metamodel-manager/class-hierarchy.ts +155 -0
- package/src/metamodel-manager/index.ts +65 -0
- package/src/metamodel-manager/interfaces.ts +422 -0
- package/src/metamodel-manager/metamodel-completeness.ts +162 -0
- package/src/metamodel-manager/metamodel-loader.ts +864 -0
- package/src/metamodel-manager/notation-resolver.ts +284 -0
- package/src/metamodel-manager/notation.ts +659 -0
- package/src/metamodel-manager/palette-generator.ts +882 -0
- package/src/metamodel-manager/property-shapes.ts +290 -0
- package/src/metamodel-manager/taxonomy.ts +904 -0
- package/src/metamodel-manager/type-guide.ts +241 -0
- package/src/metamodel-manager/viewpoint-manager.ts +147 -0
- package/src/model-manager/appearance.ts +389 -0
- package/src/model-manager/cascade.ts +246 -0
- package/src/model-manager/clipboard.ts +566 -0
- package/src/model-manager/context-names.ts +108 -0
- package/src/model-manager/custom-properties.ts +549 -0
- package/src/model-manager/derivations.ts +166 -0
- package/src/model-manager/direct-permissions.ts +182 -0
- package/src/model-manager/drawing-order.ts +119 -0
- package/src/model-manager/element-manager.ts +69 -0
- package/src/model-manager/element-pictures.ts +118 -0
- package/src/model-manager/field-names.ts +42 -0
- package/src/model-manager/folders.ts +354 -0
- package/src/model-manager/grid.ts +6 -0
- package/src/model-manager/index.ts +43 -0
- package/src/model-manager/interfaces.ts +417 -0
- package/src/model-manager/iri-conformance.ts +183 -0
- package/src/model-manager/label-expression.ts +233 -0
- package/src/model-manager/legacy-migration.ts +200 -0
- package/src/model-manager/missing-references.ts +86 -0
- package/src/model-manager/model-diff-text.ts +150 -0
- package/src/model-manager/model-diff.ts +534 -0
- package/src/model-manager/model-merge.ts +1160 -0
- package/src/model-manager/model-namespace.ts +199 -0
- package/src/model-manager/model-operations.ts +132 -0
- package/src/model-manager/model-queries.ts +616 -0
- package/src/model-manager/model-session.ts +759 -0
- package/src/model-manager/multiplicity.ts +74 -0
- package/src/model-manager/nested-resources.ts +145 -0
- package/src/model-manager/own-metamodel.ts +157 -0
- package/src/model-manager/placement-copy.ts +116 -0
- package/src/model-manager/property-catalog.ts +787 -0
- package/src/model-manager/proposal-order.ts +203 -0
- package/src/model-manager/provenance.ts +396 -0
- package/src/model-manager/questions.ts +475 -0
- package/src/model-manager/rdf-scope.ts +97 -0
- package/src/model-manager/relationship-graph.ts +462 -0
- package/src/model-manager/relationship-manager.ts +962 -0
- package/src/model-manager/relationship-table.ts +189 -0
- package/src/model-manager/relationship-validity.ts +261 -0
- package/src/model-manager/resource-edits.ts +28 -0
- package/src/model-manager/short-hash.ts +104 -0
- package/src/model-manager/snapshot-lines.ts +88 -0
- package/src/model-manager/version-history.ts +205 -0
- package/src/model-manager/view-from-results.ts +81 -0
- package/src/model-manager/view-manager.ts +1410 -0
- package/src/model-manager/vocabulary.ts +279 -0
- package/src/rdf-engine/finding-shape.ts +23 -0
- package/src/rdf-engine/graph-scope.ts +163 -0
- package/src/rdf-engine/index.ts +7 -0
- package/src/rdf-engine/interfaces.ts +144 -0
- package/src/rdf-engine/iri.ts +203 -0
- package/src/rdf-engine/localized-text.ts +13 -0
- package/src/rdf-engine/namespaces.ts +41 -0
- package/src/rdf-engine/native-load.ts +37 -0
- package/src/rdf-engine/observable-store.ts +609 -0
- package/src/rdf-engine/rdf-store.ts +520 -0
- package/src/rdf-engine/shacl-validator.ts +602 -0
- package/src/rdf-engine/shape-reach.ts +140 -0
- package/src/rdf-engine/shape-switches.ts +165 -0
- package/src/rdf-engine/single-valued.ts +219 -0
- package/src/rdf-engine/sparql-constraints.ts +349 -0
- package/src/rdf-engine/term-codec.ts +51 -0
- package/src/rdf-engine/ttl-parser.ts +51 -0
- package/src/rdf-engine/ttl-serializer.ts +79 -0
- package/src/rdf-engine/turtle-writer.ts +284 -0
- package/src/rdf-engine/validation-engine.ts +747 -0
- package/src/rdf-engine/validation-service.ts +186 -0
- package/src/rdf-engine/validation.worker.ts +47 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The metamodels the Metamodels menu offers: meta.linked.archi's catalogue.
|
|
3
|
+
*
|
|
4
|
+
* meta.linked.archi publishes a DCAT catalogue of its semantic assets at
|
|
5
|
+
* {@link CATALOGUE_IRI} (Turtle by content negotiation, or `/catalog.ttl`). A
|
|
6
|
+
* metamodel manifest's dataset names its `arch:Metamodel` with
|
|
7
|
+
* `foaf:primaryTopic`, with that metamodel's `skos:prefLabel`, and carries the
|
|
8
|
+
* section of the site's index it is listed in as its `dcat:theme` — a concept
|
|
9
|
+
* whose `skos:notation` is `languages`, `frameworks`, `extensions` or `core`.
|
|
10
|
+
* Those four sections are what the menu lists, by section and label; a
|
|
11
|
+
* metamodel in any other (the examples) is not offered, and any metamodel at
|
|
12
|
+
* all still loads through "Load by IRI" or an upload.
|
|
13
|
+
*
|
|
14
|
+
* The catalogue is read like any published document: a copy ships in
|
|
15
|
+
* `assets/catalog.ttl` (refreshed by `npm run sync-assets`), so the menu is
|
|
16
|
+
* complete offline, and `App.loadCatalogue` replaces it with the published one
|
|
17
|
+
* when it arrives — a metamodel meta.linked.archi publishes appears without a
|
|
18
|
+
* new la-gram. Every metamodel offered is meta.linked.archi's: for elements no
|
|
19
|
+
* loaded language has, Basic is the generic language (its Connection relates any
|
|
20
|
+
* two of its elements); between elements of two languages, the core's
|
|
21
|
+
* relationship types are offered.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import type { Quad } from '@rdfjs/types';
|
|
25
|
+
import { parseRdf, type AssetSource } from './asset-sources.js';
|
|
26
|
+
import { CATALOGUE_IRI } from './bundled-assets.js';
|
|
27
|
+
|
|
28
|
+
export { CATALOGUE_IRI };
|
|
29
|
+
|
|
30
|
+
/** What a catalogue entry describes. */
|
|
31
|
+
export type CatalogueKind = 'core' | 'language' | 'framework' | 'extension';
|
|
32
|
+
|
|
33
|
+
/** One published metamodel. */
|
|
34
|
+
export interface CatalogueEntry {
|
|
35
|
+
/** The `arch:Metamodel` subject IRI. */
|
|
36
|
+
iri: string;
|
|
37
|
+
label: string;
|
|
38
|
+
kind: CatalogueKind;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Section titles for {@link CatalogueKind}. */
|
|
42
|
+
export const CATALOGUE_KIND_LABELS: Record<CatalogueKind, string> = {
|
|
43
|
+
core: 'Core',
|
|
44
|
+
language: 'Modelling languages',
|
|
45
|
+
framework: 'Frameworks',
|
|
46
|
+
extension: 'Extensions',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** The catalogue sections (theme notations) the menu lists, and the kind each is. */
|
|
50
|
+
const KIND_BY_THEME: Record<string, CatalogueKind> = {
|
|
51
|
+
core: 'core',
|
|
52
|
+
languages: 'language',
|
|
53
|
+
frameworks: 'framework',
|
|
54
|
+
extensions: 'extension',
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const KIND_ORDER: readonly CatalogueKind[] = ['core', 'language', 'framework', 'extension'];
|
|
58
|
+
|
|
59
|
+
const RDF_TYPE = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type';
|
|
60
|
+
const DCAT = 'http://www.w3.org/ns/dcat#';
|
|
61
|
+
const DCTERMS_CONFORMS_TO = 'http://purl.org/dc/terms/conformsTo';
|
|
62
|
+
const FOAF_PRIMARY_TOPIC = 'http://xmlns.com/foaf/0.1/primaryTopic';
|
|
63
|
+
const SKOS = 'http://www.w3.org/2004/02/skos/core#';
|
|
64
|
+
const ARCH_METAMODEL = 'https://meta.linked.archi/core#Metamodel';
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The metamodels a catalogue offers, by section and label. A label loses the " Metamodel" every manifest's label ends in
|
|
68
|
+
* ("ArchiMate 4.0 Metamodel" → "ArchiMate 4.0"): the menu is all metamodels.
|
|
69
|
+
*/
|
|
70
|
+
export function readCatalogue(quads: readonly Quad[]): CatalogueEntry[] {
|
|
71
|
+
const values = new Map<string, Map<string, string[]>>();
|
|
72
|
+
const labels = new Map<string, string>();
|
|
73
|
+
for (const q of quads) {
|
|
74
|
+
const s = q.subject.value;
|
|
75
|
+
const p = q.predicate.value;
|
|
76
|
+
if (p === SKOS + 'prefLabel') {
|
|
77
|
+
// English first, then an untagged label.
|
|
78
|
+
const lang = q.object.termType === 'Literal' ? q.object.language : '';
|
|
79
|
+
if (lang === 'en' || (lang === '' && !labels.has(s))) labels.set(s, q.object.value);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const byPredicate = values.get(s) ?? new Map<string, string[]>();
|
|
83
|
+
byPredicate.set(p, [...(byPredicate.get(p) ?? []), q.object.value]);
|
|
84
|
+
values.set(s, byPredicate);
|
|
85
|
+
}
|
|
86
|
+
const get = (s: string, p: string) => values.get(s)?.get(p) ?? [];
|
|
87
|
+
|
|
88
|
+
const entries = new Map<string, CatalogueEntry>();
|
|
89
|
+
for (const [dataset, byPredicate] of values) {
|
|
90
|
+
if (!(byPredicate.get(RDF_TYPE) ?? []).includes(DCAT + 'Dataset')) continue;
|
|
91
|
+
if (!(byPredicate.get(DCTERMS_CONFORMS_TO) ?? []).includes(ARCH_METAMODEL)) continue;
|
|
92
|
+
const kind = (byPredicate.get(DCAT + 'theme') ?? [])
|
|
93
|
+
.map((theme) => KIND_BY_THEME[get(theme, SKOS + 'notation')[0] ?? theme.slice(theme.lastIndexOf('#') + 1)])
|
|
94
|
+
.find((k): k is CatalogueKind => k !== undefined);
|
|
95
|
+
if (!kind) continue;
|
|
96
|
+
for (const iri of byPredicate.get(FOAF_PRIMARY_TOPIC) ?? []) {
|
|
97
|
+
if (entries.has(iri)) continue;
|
|
98
|
+
const label = (labels.get(iri) ?? iri.slice(iri.lastIndexOf('#') + 1)).replace(/\s+Metamodel$/i, '');
|
|
99
|
+
entries.set(iri, { iri, label, kind });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return [...entries.values()].sort(
|
|
103
|
+
(a, b) =>
|
|
104
|
+
KIND_ORDER.indexOf(a.kind) - KIND_ORDER.indexOf(b.kind) ||
|
|
105
|
+
a.label.localeCompare(b.label, undefined, { numeric: true, sensitivity: 'base' }),
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** The metamodels of the catalogue `source` has, or `null` when it has none. */
|
|
110
|
+
export async function loadCatalogue(source: AssetSource): Promise<CatalogueEntry[] | null> {
|
|
111
|
+
const doc = await source.fetch(CATALOGUE_IRI);
|
|
112
|
+
if (!doc) return null;
|
|
113
|
+
return readCatalogue(parseRdf(doc.text, doc.format, CATALOGUE_IRI));
|
|
114
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `rdfs:subClassOf` helpers shared by the palette and the notation lookup.
|
|
3
|
+
*
|
|
4
|
+
* Two walks over the same map, for two different questions:
|
|
5
|
+
*
|
|
6
|
+
* - {@link closureOf} — *is* `arch:QualifiedRelationship` an ancestor? Order is
|
|
7
|
+
* irrelevant, so it is a plain depth-first set.
|
|
8
|
+
* - {@link superClassesNearestFirst} — *which* ancestor is nearest? The notation
|
|
9
|
+
* fallback (Req 2.16) styles a class by the closest superclass that has a
|
|
10
|
+
* descriptor, so the walk is breadth-first, each distance level sorted by IRI.
|
|
11
|
+
* Graphs are unordered; the sort is what makes the answer the same on every
|
|
12
|
+
* load.
|
|
13
|
+
*
|
|
14
|
+
* Like `taxonomy.ts` and `notation.ts`, this works on an n3 `Store` snapshot so
|
|
15
|
+
* it stays synchronous and testable against hand-written Turtle.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { DataFactory } from 'n3';
|
|
19
|
+
import type { Store } from 'n3';
|
|
20
|
+
import { NAMESPACES } from '../rdf-engine/namespaces.js';
|
|
21
|
+
|
|
22
|
+
const { namedNode } = DataFactory;
|
|
23
|
+
|
|
24
|
+
const RDF_TYPE = `${NAMESPACES.rdf}type`;
|
|
25
|
+
const RDFS_SUBCLASS_OF = `${NAMESPACES.rdfs}subClassOf`;
|
|
26
|
+
const OWL_CLASS = `${NAMESPACES.owl}Class`;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Where the notation walk ends: the two core classes every element and
|
|
30
|
+
* relationship type specialises.
|
|
31
|
+
*
|
|
32
|
+
* A root is a valid answer (a generic notation set describes exactly these two),
|
|
33
|
+
* but it is never expanded. `arch:Element ⊑ arch:ModelConcept` is real data, and
|
|
34
|
+
* walking past it would let a descriptor for the shared parent style elements
|
|
35
|
+
* and relationships alike.
|
|
36
|
+
*/
|
|
37
|
+
export const NOTATION_ROOTS: ReadonlySet<string> = new Set([
|
|
38
|
+
`${NAMESPACES.arch}Element`,
|
|
39
|
+
`${NAMESPACES.arch}QualifiedRelationship`,
|
|
40
|
+
]);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Whether a relationship type's hints let it relate any elements of its
|
|
44
|
+
* metamodel: its domain and range are declared, and name only core classes
|
|
45
|
+
* (`arch:Element`, `arch:ModelConcept`). A type with no domain or range declared
|
|
46
|
+
* does not: the absence of a hint means the metamodel did not say, not
|
|
47
|
+
* "anything". The relationship manager offers such a type only between elements
|
|
48
|
+
* of its own metamodel: between two languages, the core's types (DD-40).
|
|
49
|
+
*
|
|
50
|
+
* Generic only when no relationship table governs the type as well: a table
|
|
51
|
+
* restricts a type whatever its hints name, so the relationship manager, which
|
|
52
|
+
* knows the tables, decides.
|
|
53
|
+
*/
|
|
54
|
+
export function isGenericRelationshipType(domainTypes: readonly string[], rangeTypes: readonly string[]): boolean {
|
|
55
|
+
const core = (iri: string) => iri.startsWith(NAMESPACES.arch);
|
|
56
|
+
return domainTypes.length > 0 && rangeTypes.length > 0 && domainTypes.every(core) && rangeTypes.every(core);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Plain code-unit order for IRIs.
|
|
61
|
+
*
|
|
62
|
+
* Not `localeCompare`: its result depends on the runtime's locale data, and a
|
|
63
|
+
* tie-break has to come out the same everywhere.
|
|
64
|
+
*/
|
|
65
|
+
export function compareIris(a: string, b: string): number {
|
|
66
|
+
if (a < b) return -1;
|
|
67
|
+
if (a > b) return 1;
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Map every class IRI in the graph to its direct `rdfs:subClassOf` parents. */
|
|
72
|
+
export function buildSuperClassMap(graph: Store): Map<string, string[]> {
|
|
73
|
+
const map = new Map<string, string[]>();
|
|
74
|
+
const record = (iri: string): void => {
|
|
75
|
+
if (map.has(iri)) return;
|
|
76
|
+
map.set(
|
|
77
|
+
iri,
|
|
78
|
+
uniqueInOrder(
|
|
79
|
+
graph
|
|
80
|
+
.getObjects(namedNode(iri), namedNode(RDFS_SUBCLASS_OF), null)
|
|
81
|
+
.filter((term) => term.termType === 'NamedNode')
|
|
82
|
+
.map((term) => term.value),
|
|
83
|
+
),
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
for (const subject of graph.getSubjects(namedNode(RDF_TYPE), namedNode(OWL_CLASS), null)) {
|
|
88
|
+
if (subject.termType === 'NamedNode') record(subject.value);
|
|
89
|
+
}
|
|
90
|
+
for (const subject of graph.getSubjects(namedNode(RDFS_SUBCLASS_OF), null, null)) {
|
|
91
|
+
if (subject.termType === 'NamedNode') record(subject.value);
|
|
92
|
+
}
|
|
93
|
+
return map;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Transitive `rdfs:subClassOf` closure of `iri`, excluding `iri` itself. */
|
|
97
|
+
export function closureOf(iri: string, superClassMap: ReadonlyMap<string, readonly string[]>): string[] {
|
|
98
|
+
const seen = new Set<string>();
|
|
99
|
+
const stack = [...(superClassMap.get(iri) ?? [])];
|
|
100
|
+
while (stack.length > 0) {
|
|
101
|
+
const current = stack.pop();
|
|
102
|
+
if (!current || seen.has(current)) continue;
|
|
103
|
+
seen.add(current);
|
|
104
|
+
for (const parent of superClassMap.get(current) ?? []) stack.push(parent);
|
|
105
|
+
}
|
|
106
|
+
return [...seen];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The superclasses of `classIri`, nearest first.
|
|
111
|
+
*
|
|
112
|
+
* Breadth-first: every class at shortest distance *k* comes before any class at
|
|
113
|
+
* distance *k + 1*, and each distance level is sorted by {@link compareIris}, so
|
|
114
|
+
* of two equally near superclasses the lower IRI comes first. A class reachable
|
|
115
|
+
* along several paths is listed once, at its shortest distance, which also makes
|
|
116
|
+
* the walk terminate on a `rdfs:subClassOf` cycle.
|
|
117
|
+
*
|
|
118
|
+
* A class in `stopAt` is included when it is reached and never expanded. When
|
|
119
|
+
* `classIri` is itself in `stopAt` the result is empty.
|
|
120
|
+
*
|
|
121
|
+
* @returns Superclass IRIs, `classIri` excluded.
|
|
122
|
+
*/
|
|
123
|
+
export function superClassesNearestFirst(
|
|
124
|
+
classIri: string,
|
|
125
|
+
superClassMap: ReadonlyMap<string, readonly string[]>,
|
|
126
|
+
stopAt: ReadonlySet<string> = NOTATION_ROOTS,
|
|
127
|
+
): string[] {
|
|
128
|
+
if (stopAt.has(classIri)) return [];
|
|
129
|
+
|
|
130
|
+
const visited = new Set<string>([classIri]);
|
|
131
|
+
const ordered: string[] = [];
|
|
132
|
+
let frontier: string[] = [classIri];
|
|
133
|
+
|
|
134
|
+
while (frontier.length > 0) {
|
|
135
|
+
const level: string[] = [];
|
|
136
|
+
for (const current of frontier) {
|
|
137
|
+
// A root reached at the previous level is part of the answer, not a way up.
|
|
138
|
+
if (current !== classIri && stopAt.has(current)) continue;
|
|
139
|
+
for (const parent of superClassMap.get(current) ?? []) {
|
|
140
|
+
if (visited.has(parent)) continue;
|
|
141
|
+
visited.add(parent);
|
|
142
|
+
level.push(parent);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
level.sort(compareIris);
|
|
146
|
+
ordered.push(...level);
|
|
147
|
+
frontier = level;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return ordered;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function uniqueInOrder(items: string[]): string[] {
|
|
154
|
+
return [...new Set(items)];
|
|
155
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Metamodel Manager layer — metamodel loading, palette generation, viewpoint management
|
|
2
|
+
export type {
|
|
3
|
+
MetamodelLoader,
|
|
4
|
+
PaletteGenerator,
|
|
5
|
+
ViewpointManager,
|
|
6
|
+
MetamodelInfo,
|
|
7
|
+
LoadedMetamodel,
|
|
8
|
+
MetamodelAssetStatus,
|
|
9
|
+
MetamodelAssetOutcome,
|
|
10
|
+
PaletteDefinition,
|
|
11
|
+
PaletteOptions,
|
|
12
|
+
PaletteAxis,
|
|
13
|
+
ElementGroup,
|
|
14
|
+
ElementTypeInfo,
|
|
15
|
+
RelationshipTypeInfo,
|
|
16
|
+
ResolvedUri,
|
|
17
|
+
ViewpointInfo,
|
|
18
|
+
} from './interfaces.js';
|
|
19
|
+
export { N3MetamodelLoader } from './metamodel-loader.js';
|
|
20
|
+
export { SparqlPaletteGenerator } from './palette-generator.js';
|
|
21
|
+
export { SparqlViewpointManager } from './viewpoint-manager.js';
|
|
22
|
+
export type { BundledAsset, BundledAssetRole } from './bundled-assets.js';
|
|
23
|
+
export {
|
|
24
|
+
ASSET_ROOT,
|
|
25
|
+
PUBLISHED_BASE_URI,
|
|
26
|
+
BUNDLED_ICON_PREFIXES,
|
|
27
|
+
BUNDLED_ASSETS,
|
|
28
|
+
getAssetsByRole,
|
|
29
|
+
getAssetByIri,
|
|
30
|
+
resolveIconUri,
|
|
31
|
+
resolveIconUriOrPassThrough,
|
|
32
|
+
configureAssetRoot,
|
|
33
|
+
assetUrl,
|
|
34
|
+
fetchAssetText,
|
|
35
|
+
fetchAllAssetTexts,
|
|
36
|
+
} from './bundled-assets.js';
|
|
37
|
+
export type {
|
|
38
|
+
TaxonomyAxis,
|
|
39
|
+
SemanticClass,
|
|
40
|
+
} from './taxonomy.js';
|
|
41
|
+
export { buildClassificationAxes, buildClasses, matchesClass } from './taxonomy.js';
|
|
42
|
+
export type {
|
|
43
|
+
VisualStyle,
|
|
44
|
+
RelationshipVisualStyle,
|
|
45
|
+
VisualNotation,
|
|
46
|
+
NotationSet,
|
|
47
|
+
ShapeType,
|
|
48
|
+
IconPlacement,
|
|
49
|
+
RenderingMode,
|
|
50
|
+
LineStyle,
|
|
51
|
+
Decoration,
|
|
52
|
+
} from './notation.js';
|
|
53
|
+
export {
|
|
54
|
+
buildVisualNotations,
|
|
55
|
+
resolveNotationSetForContext,
|
|
56
|
+
listNotationSets,
|
|
57
|
+
effectiveRenderingMode,
|
|
58
|
+
} from './notation.js';
|
|
59
|
+
export type { NotationSource, ResolvedNotation, NotationIndexEntry } from './notation-resolver.js';
|
|
60
|
+
export {
|
|
61
|
+
coreNotationSetIris,
|
|
62
|
+
NotationResolver,
|
|
63
|
+
orderedFallbackSets,
|
|
64
|
+
storeDefaultNotationSetIris,
|
|
65
|
+
} from './notation-resolver.js';
|