@linked.archi/kernel 0.1.5 → 0.1.7
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/README.md +8 -0
- package/assets/archimate3/archimate3.2-metamodel.ttl +18 -1
- package/assets/archimate3/archimate3.2-principle-shapes.ttl +16 -22
- package/assets/archimate3/archimate3.2-questions.ttl +38 -38
- package/assets/archimate3/archimate3.2-viewpoint-shapes.ttl +1 -1
- package/assets/archimate4/archimate4-metamodel.ttl +18 -1
- package/assets/archimate4/archimate4-principle-shapes.ttl +38 -36
- package/assets/archimate4/archimate4-questions.ttl +38 -38
- package/assets/archimate4/archimate4-viewpoint-shapes.ttl +1 -1
- package/assets/catalog.ttl +776 -464
- package/assets/core/core-onto.ttl +12 -9
- package/assets/core/core-shapes.ttl +1 -1
- package/assets/core/core-vis-onto.ttl +99 -5
- package/assets/core/core-vis-shapes.ttl +275 -11
- package/package.json +5 -2
- package/src/model-manager/appearance.ts +131 -7
- package/src/model-manager/cascade.ts +5 -3
- package/src/model-manager/clipboard.ts +10 -2
- package/src/model-manager/concept-styles.ts +230 -0
- package/src/model-manager/interfaces.ts +19 -1
- package/src/model-manager/iri-conformance.ts +9 -2
- package/src/model-manager/placement-copy.ts +35 -8
- package/src/model-manager/questions.ts +6 -1
- package/src/model-manager/style-sets.ts +399 -0
- package/src/model-manager/style-values.ts +349 -0
- package/src/model-manager/view-manager.ts +74 -22
- package/src/model-manager/vocabulary.ts +10 -0
- package/src/rdf-engine/iri.ts +6 -3
- package/src/rdf-engine/native-load.ts +37 -0
- package/src/rdf-engine/observable-store.ts +98 -120
- package/src/rdf-engine/rdf-store.ts +14 -2
- package/src/rdf-engine/sparql-constraints.ts +15 -0
- package/src/rdf-engine/turtle-writer.ts +1 -0
- package/src/rdf-engine/validation-engine.ts +97 -32
- package/src/rdf-engine/validation-service.ts +3 -1
|
@@ -34,7 +34,7 @@ Trademarked names (UML, BPMN, ArchiMate, TOGAF, etc.) referenced herein are prop
|
|
|
34
34
|
'''@en ;
|
|
35
35
|
dcterms:created "2019-03-17"^^xsd:date ;
|
|
36
36
|
dcterms:issued "2019-03-17"^^xsd:date ;
|
|
37
|
-
dcterms:modified "2026-
|
|
37
|
+
dcterms:modified "2026-12-04"^^xsd:date ;
|
|
38
38
|
dcterms:publisher "Linked.Archi"@en, <https://linked.archi> ;
|
|
39
39
|
bibo:status "draft" ;
|
|
40
40
|
owl:versionIRI <https://meta.linked.archi/core#> ;
|
|
@@ -824,7 +824,7 @@ what is recorded about them, how sound the description is, and what its views sh
|
|
|
824
824
|
skos:inScheme :QuestionStageScheme ;
|
|
825
825
|
skos:notation "analysis" ;
|
|
826
826
|
skos:prefLabel "Analysis"@en ;
|
|
827
|
-
skos:definition "Dependencies, traceability,
|
|
827
|
+
skos:definition "Dependencies, traceability, realization and the impact of change."@en ;
|
|
828
828
|
.
|
|
829
829
|
|
|
830
830
|
:EnrichmentStage
|
|
@@ -1507,7 +1507,7 @@ A baseline architecture describes the implemented, operational reality.'''@en ;
|
|
|
1507
1507
|
skos:prefLabel "Target"@en ;
|
|
1508
1508
|
skos:altLabel "To-Be"@en, "Future State"@en ;
|
|
1509
1509
|
skos:definition '''The desired future state of the architecture — how the system should
|
|
1510
|
-
exist after planned changes are
|
|
1510
|
+
exist after planned changes are realized.'''@en ;
|
|
1511
1511
|
.
|
|
1512
1512
|
|
|
1513
1513
|
:Transitional
|
|
@@ -2015,13 +2015,16 @@ metamodel's own concepts rather than relating them to another language.
|
|
|
2015
2015
|
|
|
2016
2016
|
Mappings are editorial judgements, not derivations. Use skos:closeMatch rather than
|
|
2017
2017
|
skos:exactMatch unless the two concepts genuinely coincide in scope, and expect the weaker
|
|
2018
|
-
skos:relatedMatch to be the common case across frameworks whose abstractions differ.
|
|
2019
|
-
skos:example '''togaf:TOGAFMetamodel
|
|
2020
|
-
arch:crossLanguageMappings <https://meta.linked.archi/togaf/crossmappings#> .
|
|
2018
|
+
skos:relatedMatch to be the common case across frameworks whose abstractions differ.
|
|
2021
2019
|
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2020
|
+
Each pair of languages has one mapping document, and the metamodels of both languages link
|
|
2021
|
+
to it: the correspondences are written once and found from either side.'''@en ;
|
|
2022
|
+
skos:example '''togafmm:TOGAF10 arch:crossLanguageMappings <https://meta.linked.archi/crossmappings/togaf-archimate#> .
|
|
2023
|
+
am4mm:ArchiMate4 arch:crossLanguageMappings <https://meta.linked.archi/crossmappings/togaf-archimate#> .
|
|
2024
|
+
|
|
2025
|
+
## in crossmappings/togaf-archimate.ttl
|
|
2026
|
+
togaf:LogicalApplicationComponent skos:closeMatch am4:ApplicationComponent .
|
|
2027
|
+
togaf:Capability skos:closeMatch am4:Capability .'''@en ;
|
|
2025
2028
|
rdfs:domain :Metamodel ;
|
|
2026
2029
|
rdfs:range owl:Ontology ;
|
|
2027
2030
|
skos:broader :MetamodelingCategory ;
|
|
@@ -732,7 +732,7 @@ mark, which is what tells it from a Concern's noun phrase — as a language-tagg
|
|
|
732
732
|
# 5. Viewpoint completeness
|
|
733
733
|
#
|
|
734
734
|
# A viewpoint should say which concepts it admits, which concerns it
|
|
735
|
-
# frames and which kinds of view
|
|
735
|
+
# frames and which kinds of view realize it. A viewpoint that frames
|
|
736
736
|
# no concern is not a viewpoint in the ISO 42010 sense. Not errors —
|
|
737
737
|
# an incomplete viewpoint definition, which is why this is sh:Info.
|
|
738
738
|
#################################################################
|
|
@@ -24,13 +24,27 @@ Provides vocabulary for diagram interchange (nodes, links, bounds) and visual st
|
|
|
24
24
|
(colors, fonts, shapes, icons). Used both at the instance level (diagram elements) and
|
|
25
25
|
at the type level (default notation for model concepts via NotationSet).'''@en ;
|
|
26
26
|
dcterms:issued "2019-03-17"^^xsd:date ;
|
|
27
|
-
dcterms:modified "2026-
|
|
27
|
+
dcterms:modified "2026-12-04"^^xsd:date ;
|
|
28
28
|
dcterms:publisher <https://linked.archi> ;
|
|
29
29
|
dcterms:publisher "Linked.Archi"@en ;
|
|
30
30
|
dcterms:title "Core Linked.Archi Ontology for Diagrams and Visual Notation"@en ;
|
|
31
|
-
owl:versionInfo "0.
|
|
31
|
+
owl:versionInfo "0.11"@en ;
|
|
32
32
|
rdfs:seeAlso <https://meta.linked.archi/core-vis-shapes#> ;
|
|
33
|
-
skos:historyNote '''0.
|
|
33
|
+
skos:historyNote '''0.11: Looks to share, and a concept's own. arch-vis:StyleSet is a named set of styles — a team's
|
|
34
|
+
or an organisation's standard looks, such as "To retire" or "Strategic" — each a Style that says it is in it
|
|
35
|
+
(arch-vis:inStyleSet) and has a name (skos:prefLabel), kept in a model or in a document of its own that a model
|
|
36
|
+
names with arch-vis:usesStyleSet. A named style is for every presentation context, and may look otherwise to one
|
|
37
|
+
audience: its look for that context is another style of the set, for the context (core's arch:inPresentationContext),
|
|
38
|
+
based on it — so the set is complete for each audience. A diagram element takes a named style by basing its own
|
|
39
|
+
style on it (arch-vis:basedOn): it is drawn with the named style's values — its look for the context shown, then its
|
|
40
|
+
look for every context — wherever its own style sets none, and follows the named style as it changes.
|
|
41
|
+
arch-vis:conceptStyle gives a model concept a look of its own the same way: one for every presentation context and
|
|
42
|
+
one for each, as names and pictures for an audience are given. It is kept for the concept's diagram elements to
|
|
43
|
+
take, drawn where one's style is based on its look for every context, so that a system keeps a look of its own and
|
|
44
|
+
its diagram elements are drawn as its type is until one is given it. Before, a look could only be given to each
|
|
45
|
+
diagram element, so a team's standard colours were retyped on every one and a change to them reached none.
|
|
46
|
+
|
|
47
|
+
0.10: Which node is drawn above which. arch-vis:zOrder, an integer on a node, orders it
|
|
34
48
|
among the nodes drawn in the same place — the view's top level, or inside the same container — the higher above
|
|
35
49
|
the lower, the same in the order of their IRIs; absent, 0. A diagram's drawing order was nowhere in its data:
|
|
36
50
|
a tool drew the nodes in whatever order it read them, so two overlapping nodes could swap after a save and a
|
|
@@ -411,7 +425,9 @@ above: a converter keeps that order as zOrder.'''@en ;
|
|
|
411
425
|
arch-vis:Style
|
|
412
426
|
a owl:Class ;
|
|
413
427
|
rdfs:label "Style"@en ;
|
|
414
|
-
rdfs:comment
|
|
428
|
+
rdfs:comment '''A look — fill, line, font, figure: a diagram element's own (arch-vis:style), a concept type's
|
|
429
|
+
in its notation (arch-vis:defaultStyle), one of a StyleSet's named styles (arch-vis:inStyleSet), or a model
|
|
430
|
+
concept's own (arch-vis:conceptStyle).'''@en ;
|
|
415
431
|
.
|
|
416
432
|
|
|
417
433
|
arch-vis:style
|
|
@@ -420,11 +436,89 @@ arch-vis:style
|
|
|
420
436
|
rdfs:comment '''How a diagram element looks. It has at most one style for every presentation context — one
|
|
421
437
|
without core's arch:inPresentationContext — and at most one for each context. Drawn for a context, it
|
|
422
438
|
takes its style for every context, overlaid value by value by its style for that context; drawn for none,
|
|
423
|
-
its style for every context alone. A diagram element with one style looks the same to everyone.
|
|
439
|
+
its style for every context alone. A diagram element with one style looks the same to everyone.
|
|
440
|
+
|
|
441
|
+
Each of its styles may be based on another (arch-vis:basedOn) — a StyleSet's style, or its concept's own look, for
|
|
442
|
+
every context — whose values it takes where it sets none: drawn for a context, the look for that context of the
|
|
443
|
+
style based on first, then its look for every context. Value by value, a diagram element drawn for a context takes
|
|
444
|
+
the first that says it:
|
|
445
|
+
1. its style for that context; then the style that one is based on, its look for that context, then for every
|
|
446
|
+
context;
|
|
447
|
+
2. its style for every context; then the style that one is based on, its look for that context, then for every
|
|
448
|
+
context;
|
|
449
|
+
3. its concept's notation: that of the notation set the context is drawn with, then the default.
|
|
450
|
+
Drawn for no context: its style for every context, then the style that one is based on, for every context; then 3.
|
|
451
|
+
A concept's own look (arch-vis:conceptStyle) is drawn where one of these styles is based on it, never by itself.'''@en ;
|
|
424
452
|
rdfs:domain arch-vis:DiagElement ;
|
|
425
453
|
rdfs:range arch-vis:Style ;
|
|
426
454
|
.
|
|
427
455
|
|
|
456
|
+
arch-vis:StyleSet
|
|
457
|
+
a owl:Class ;
|
|
458
|
+
rdfs:label "StyleSet"@en ;
|
|
459
|
+
rdfs:comment '''A named set of styles to apply: a team's or an organisation's standard looks, such as "To retire"
|
|
460
|
+
or "Strategic". Its name is its skos:prefLabel. Each of its styles says it is in it (arch-vis:inStyleSet), has a
|
|
461
|
+
name of its own (skos:prefLabel) and may say what it is for (skos:definition); it is for every presentation
|
|
462
|
+
context, and based on no other style. A style may look otherwise to one audience: its look for that presentation
|
|
463
|
+
context is another style of the set, for that context (core's arch:inPresentationContext) and based on it
|
|
464
|
+
(arch-vis:basedOn), at most one for each context. So the set is complete for each audience, what a look for one
|
|
465
|
+
does not set being the style's for every context. A set is kept in the model whose diagrams use it, or in a
|
|
466
|
+
document of its own, published, that models name (arch-vis:usesStyleSet). A diagram element takes one of its
|
|
467
|
+
styles by basing its own style on the style for every context: a change to a named style, or to its look for a
|
|
468
|
+
context, changes every diagram element based on it.'''@en ;
|
|
469
|
+
.
|
|
470
|
+
|
|
471
|
+
arch-vis:inStyleSet
|
|
472
|
+
a owl:ObjectProperty,
|
|
473
|
+
owl:FunctionalProperty ;
|
|
474
|
+
rdfs:label "inStyleSet"@en ;
|
|
475
|
+
rdfs:comment "Links a Style to the StyleSet it is one of the named styles of, or, for one presentation context, the look of one of them."@en ;
|
|
476
|
+
rdfs:domain arch-vis:Style ;
|
|
477
|
+
rdfs:range arch-vis:StyleSet ;
|
|
478
|
+
.
|
|
479
|
+
|
|
480
|
+
arch-vis:usesStyleSet
|
|
481
|
+
a owl:ObjectProperty ;
|
|
482
|
+
rdfs:label "usesStyleSet"@en ;
|
|
483
|
+
rdfs:comment '''The style sets a model's diagrams take styles from: kept in the model, or published in a
|
|
484
|
+
document of their own and read with the model, as the metamodels it conforms to are.'''@en ;
|
|
485
|
+
rdfs:domain arch:Model ;
|
|
486
|
+
rdfs:range arch-vis:StyleSet ;
|
|
487
|
+
.
|
|
488
|
+
|
|
489
|
+
arch-vis:basedOn
|
|
490
|
+
a owl:ObjectProperty,
|
|
491
|
+
owl:FunctionalProperty ;
|
|
492
|
+
rdfs:label "basedOn"@en ;
|
|
493
|
+
rdfs:comment '''The style a Style takes its values from wherever it sets none of its own, following it as it
|
|
494
|
+
changes. On a diagram element's style: a StyleSet's style for every presentation context (arch-vis:inStyleSet), or
|
|
495
|
+
the diagram element's concept's look for every presentation context (arch-vis:conceptStyle); drawn for a context,
|
|
496
|
+
the look for that context of the style based on comes first — the set's style for that context based on it, the
|
|
497
|
+
concept's look for that context. On a StyleSet's style for one context: the set's style for every context whose
|
|
498
|
+
look it is there. The style based on is based on none, so the values come from one place. Where the style based on
|
|
499
|
+
is not there — a set the model no longer uses, a copy pasted into another model — its values are written on the
|
|
500
|
+
style instead, and its looks for each context on the diagram element's style for that context.'''@en ;
|
|
501
|
+
rdfs:domain arch-vis:Style ;
|
|
502
|
+
rdfs:range arch-vis:Style ;
|
|
503
|
+
.
|
|
504
|
+
|
|
505
|
+
arch-vis:conceptStyle
|
|
506
|
+
a owl:ObjectProperty ;
|
|
507
|
+
rdfs:label "conceptStyle"@en ;
|
|
508
|
+
rdfs:comment '''A model concept's own look — an element's, a relationship's, a view's — as distinct from its
|
|
509
|
+
type's notation (arch-vis:defaultStyle) and from a diagram element's own (arch-vis:style). A concept has at most
|
|
510
|
+
one for every presentation context and one for each context (core's arch:inPresentationContext), as names and
|
|
511
|
+
pictures for an audience are given: together, a style of its own, complete for each audience, as a StyleSet's
|
|
512
|
+
style and its looks for each context are. It is kept for the concept's diagram elements to take, never drawn by
|
|
513
|
+
itself: a diagram element whose style is based on the concept's look for every context (arch-vis:basedOn) is drawn
|
|
514
|
+
with it — for a context, the concept's look for that context first (arch-vis:style lists the order). Its look for
|
|
515
|
+
every context is what is based on, and may set nothing where only an audience's look is given. So a system keeps a
|
|
516
|
+
look of its own, and its diagram elements are drawn as its type is until one is given it. A concept's look is based
|
|
517
|
+
on no other style, and is in no StyleSet.'''@en ;
|
|
518
|
+
arch:domainIncludes arch:ModelConcept ;
|
|
519
|
+
rdfs:range arch-vis:Style ;
|
|
520
|
+
.
|
|
521
|
+
|
|
428
522
|
arch-vis:fillColor
|
|
429
523
|
a owl:DatatypeProperty,
|
|
430
524
|
owl:FunctionalProperty ;
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
dcterms:title "Linked.Archi Core Visual Notation SHACL Shapes"@en ;
|
|
30
30
|
dcterms:description '''SHACL shapes for the Linked.Archi diagram and visual notation
|
|
31
31
|
layer (core-vis). Constrains the diagram interchange classes — ArchNode, LabelNode,
|
|
32
|
-
ViewReferenceNode, ContainerNode, Link, Point, PointList —
|
|
33
|
-
VisualNotation and Style.
|
|
32
|
+
ViewReferenceNode, ContainerNode, Link, Point, PointList — the type-level notation classes NotationSet,
|
|
33
|
+
VisualNotation and Style, and the shared styles of a StyleSet and a concept's own look.
|
|
34
34
|
|
|
35
35
|
Until 0.1.0 the diagram layer had no shapes at all: a validate run loaded the notation's
|
|
36
36
|
own shapes and the core shapes, none of which target a core-vis class, so nothing checked
|
|
@@ -40,14 +40,27 @@ clean. The two load-bearing rules here are ArchNodeShape (a diagram node that cl
|
|
|
40
40
|
stand for a model element must say which one) and PlacedDiagElementShape (a shape or edge
|
|
41
41
|
must belong to exactly one view); the remainder is cardinality and datatype hygiene.'''@en ;
|
|
42
42
|
dcterms:created "2026-08-13"^^xsd:date ;
|
|
43
|
-
dcterms:modified "2026-
|
|
43
|
+
dcterms:modified "2026-12-04"^^xsd:date ;
|
|
44
44
|
dcterms:publisher "Linked.Archi"@en,
|
|
45
45
|
<https://linked.archi> ;
|
|
46
46
|
bibo:status "draft" ;
|
|
47
|
-
owl:versionIRI <https://meta.linked.archi/core-vis-shapes/0.
|
|
48
|
-
owl:versionInfo "0.
|
|
49
|
-
owl:priorVersion <https://meta.linked.archi/core-vis-shapes/0.
|
|
50
|
-
skos:historyNote '''0.
|
|
47
|
+
owl:versionIRI <https://meta.linked.archi/core-vis-shapes/0.7.0#> ;
|
|
48
|
+
owl:versionInfo "0.7.0"@en ;
|
|
49
|
+
owl:priorVersion <https://meta.linked.archi/core-vis-shapes/0.6.1#> ;
|
|
50
|
+
skos:historyNote '''0.7.0 — The shared styles and a concept's own look, which core-vis 0.11 adds.
|
|
51
|
+
StyleSetShape: a StyleSet has a name. NamedStyleShape: a set's style is in one set and named in a language — for
|
|
52
|
+
every presentation context or, as StyleShape allows, for one. NamedStyleNameShape and NamedStyleBasedOnShape: a
|
|
53
|
+
set's style for every context has a name and is based on no other style (SPARQL). NamedStyleLookShape: a set's
|
|
54
|
+
style for one context is based on a style of its own set for every context, whose look it is there;
|
|
55
|
+
NamedStyleLooksShape: at most one such look for each context (SPARQL). StyleSetUseShape: arch-vis:usesStyleSet
|
|
56
|
+
points to StyleSets. BasedOnShape: a style is based on at most one Style — a set's style for every context, or the
|
|
57
|
+
look for every context of the concept its diagram element draws — and never on a look for one context (SPARQL).
|
|
58
|
+
ConceptStyleUseShape: a concept's looks are Styles, at most one for every context and one for each (SPARQL).
|
|
59
|
+
ConceptStyleShape: a concept's look is based on no other style and is in no set.
|
|
60
|
+
0.6.1 — NestedNodeShape's query joins arch-vis:inNode inside each branch of its
|
|
61
|
+
union: the same findings, without pairing every node that has a view with every other first (115 s on a model
|
|
62
|
+
of 365 000 triples with 5 213 nested nodes, in Oxigraph; 21 ms after).
|
|
63
|
+
0.6.0 — NodeOrderShape: a node's arch-vis:zOrder, which core-vis 0.10 adds, is
|
|
51
64
|
a single xsd:integer.
|
|
52
65
|
|
|
53
66
|
0.5.0 — ViewReferenceNodeShape: a reference to another view, which
|
|
@@ -76,6 +89,9 @@ relationship ends on that relationship's edge.'''@en ;
|
|
|
76
89
|
] , [
|
|
77
90
|
sh:prefix "arch" ;
|
|
78
91
|
sh:namespace "https://meta.linked.archi/core#"^^xsd:anyURI ;
|
|
92
|
+
] , [
|
|
93
|
+
sh:prefix "skos" ;
|
|
94
|
+
sh:namespace "http://www.w3.org/2004/02/skos/core#"^^xsd:anyURI ;
|
|
79
95
|
] ;
|
|
80
96
|
dcterms:source <https://meta.linked.archi/core-vis#> ;
|
|
81
97
|
prov:wasDerivedFrom <https://meta.linked.archi/core-vis#> ;
|
|
@@ -315,10 +331,18 @@ edges may be labelled — the domain is DiagElement since core-vis 0.3.'''@en ;
|
|
|
315
331
|
sh:select """
|
|
316
332
|
SELECT $this ?value
|
|
317
333
|
WHERE {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
{
|
|
334
|
+
# arch-vis:inNode inside each branch rather than joined to the union: an engine that
|
|
335
|
+
# evaluates the union on its own (Oxigraph does) pairs every node with a view with
|
|
336
|
+
# every other first, which took minutes on a model of nine thousand nodes.
|
|
337
|
+
{
|
|
338
|
+
$this arch-vis:inNode ?value .
|
|
339
|
+
$this arch-vis:view ?view .
|
|
340
|
+
?value arch-vis:view ?other .
|
|
341
|
+
FILTER(?view != ?other)
|
|
342
|
+
} UNION {
|
|
343
|
+
$this arch-vis:inNode ?value .
|
|
344
|
+
$this arch-vis:inNode+ $this .
|
|
345
|
+
}
|
|
322
346
|
}
|
|
323
347
|
""" ;
|
|
324
348
|
] ;
|
|
@@ -638,6 +662,246 @@ BottomRight, Fill).'''@en ;
|
|
|
638
662
|
.
|
|
639
663
|
|
|
640
664
|
|
|
665
|
+
#################################################################
|
|
666
|
+
# Shared styles and a concept's own look (core-vis 0.11)
|
|
667
|
+
#
|
|
668
|
+
# A StyleSet's style is named, for every presentation context, and
|
|
669
|
+
# based on nothing; its look for one context is another style of the
|
|
670
|
+
# set, for that context and based on it, at most one for each context.
|
|
671
|
+
# A diagram element's style based on a style (arch-vis:basedOn) is
|
|
672
|
+
# based on a set's style for every context, or on its own concept's
|
|
673
|
+
# look for every context — never on another diagram element's style,
|
|
674
|
+
# nor on a look for one context, which is read through the style for
|
|
675
|
+
# every context — so the values drawn come from one place, and there is
|
|
676
|
+
# no chain to follow or loop. A concept has at most one look for every
|
|
677
|
+
# context and one for each.
|
|
678
|
+
#################################################################
|
|
679
|
+
|
|
680
|
+
# The property shapes here are named, so that a report names the rule each
|
|
681
|
+
# result breaks (the core-vis-styles preset in .scripts/validate.sh).
|
|
682
|
+
|
|
683
|
+
:StyleSetShape
|
|
684
|
+
a sh:NodeShape ;
|
|
685
|
+
sh:targetClass arch-vis:StyleSet ;
|
|
686
|
+
rdfs:label "StyleSet shape"@en ;
|
|
687
|
+
sh:property :StyleSetNameShape ;
|
|
688
|
+
.
|
|
689
|
+
:StyleSetNameShape
|
|
690
|
+
a sh:PropertyShape ;
|
|
691
|
+
sh:path skos:prefLabel ;
|
|
692
|
+
sh:minCount 1 ;
|
|
693
|
+
sh:datatype rdf:langString ;
|
|
694
|
+
sh:message "A StyleSet has a name: a skos:prefLabel, in a language."@en ;
|
|
695
|
+
.
|
|
696
|
+
|
|
697
|
+
:NamedStyleShape
|
|
698
|
+
a sh:NodeShape ;
|
|
699
|
+
sh:targetSubjectsOf arch-vis:inStyleSet ;
|
|
700
|
+
rdfs:label "Named style shape"@en ;
|
|
701
|
+
# For every presentation context or for one — StyleShape says a style is for at most one.
|
|
702
|
+
sh:property :NamedStyleSetShape, :NamedStyleLanguageShape ;
|
|
703
|
+
.
|
|
704
|
+
:NamedStyleSetShape
|
|
705
|
+
a sh:PropertyShape ;
|
|
706
|
+
sh:path arch-vis:inStyleSet ;
|
|
707
|
+
sh:maxCount 1 ;
|
|
708
|
+
sh:nodeKind sh:IRI ;
|
|
709
|
+
sh:class arch-vis:StyleSet ;
|
|
710
|
+
sh:message "A named style is in one arch-vis:StyleSet."@en ;
|
|
711
|
+
.
|
|
712
|
+
:NamedStyleLanguageShape
|
|
713
|
+
a sh:PropertyShape ;
|
|
714
|
+
sh:path skos:prefLabel ;
|
|
715
|
+
sh:datatype rdf:langString ;
|
|
716
|
+
sh:message "A StyleSet's style is named in a language: its skos:prefLabel is language-tagged."@en ;
|
|
717
|
+
.
|
|
718
|
+
|
|
719
|
+
# A set's style for every context is what a diagram element is based on: named, and based on nothing.
|
|
720
|
+
:NamedStyleNameShape
|
|
721
|
+
a sh:NodeShape ;
|
|
722
|
+
sh:targetSubjectsOf arch-vis:inStyleSet ;
|
|
723
|
+
rdfs:label "Named style name shape"@en ;
|
|
724
|
+
sh:sparql [
|
|
725
|
+
sh:prefixes <https://meta.linked.archi/core-vis-shapes#> ;
|
|
726
|
+
sh:message "{$this} is a StyleSet's style for every presentation context, and has no name: a skos:prefLabel, in a language."@en ;
|
|
727
|
+
sh:select """
|
|
728
|
+
SELECT $this
|
|
729
|
+
WHERE {
|
|
730
|
+
$this arch-vis:inStyleSet ?set .
|
|
731
|
+
FILTER NOT EXISTS { $this arch:inPresentationContext ?context }
|
|
732
|
+
FILTER NOT EXISTS { $this skos:prefLabel ?name . FILTER (lang(?name) != "") }
|
|
733
|
+
}
|
|
734
|
+
""" ;
|
|
735
|
+
] ;
|
|
736
|
+
.
|
|
737
|
+
:NamedStyleBasedOnShape
|
|
738
|
+
a sh:NodeShape ;
|
|
739
|
+
sh:targetSubjectsOf arch-vis:inStyleSet ;
|
|
740
|
+
rdfs:label "Named style based-on shape"@en ;
|
|
741
|
+
sh:sparql [
|
|
742
|
+
sh:prefixes <https://meta.linked.archi/core-vis-shapes#> ;
|
|
743
|
+
sh:message "{$this} is a StyleSet's style for every presentation context, based on {?base}: a set's style is based on no other style, and what is based on it takes its values from it alone."@en ;
|
|
744
|
+
sh:select """
|
|
745
|
+
SELECT $this ?base
|
|
746
|
+
WHERE {
|
|
747
|
+
$this arch-vis:basedOn ?base .
|
|
748
|
+
FILTER NOT EXISTS { $this arch:inPresentationContext ?context }
|
|
749
|
+
}
|
|
750
|
+
""" ;
|
|
751
|
+
] ;
|
|
752
|
+
.
|
|
753
|
+
|
|
754
|
+
# A set's style for one context is the look there of the set's style for every context it is based on.
|
|
755
|
+
:NamedStyleLookShape
|
|
756
|
+
a sh:NodeShape ;
|
|
757
|
+
sh:targetSubjectsOf arch-vis:inStyleSet ;
|
|
758
|
+
rdfs:label "Named style look shape"@en ;
|
|
759
|
+
sh:sparql [
|
|
760
|
+
sh:prefixes <https://meta.linked.archi/core-vis-shapes#> ;
|
|
761
|
+
sh:message "{$this} is a StyleSet's style for {?context}: it is the look there of a style of its own set for every presentation context, which it is based on (arch-vis:basedOn)."@en ;
|
|
762
|
+
sh:select """
|
|
763
|
+
SELECT $this ?context
|
|
764
|
+
WHERE {
|
|
765
|
+
$this arch:inPresentationContext ?context ;
|
|
766
|
+
arch-vis:inStyleSet ?set .
|
|
767
|
+
FILTER NOT EXISTS {
|
|
768
|
+
$this arch-vis:basedOn ?base .
|
|
769
|
+
?base arch-vis:inStyleSet ?set .
|
|
770
|
+
FILTER NOT EXISTS { ?base arch:inPresentationContext ?other }
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
""" ;
|
|
774
|
+
] ;
|
|
775
|
+
.
|
|
776
|
+
:NamedStyleLooksShape
|
|
777
|
+
a sh:NodeShape ;
|
|
778
|
+
sh:targetSubjectsOf arch-vis:inStyleSet ;
|
|
779
|
+
rdfs:label "Named style looks shape"@en ;
|
|
780
|
+
sh:sparql [
|
|
781
|
+
sh:prefixes <https://meta.linked.archi/core-vis-shapes#> ;
|
|
782
|
+
sh:message "{$this} has {?count} looks for {?context} in its set: at most one for each presentation context."@en ;
|
|
783
|
+
sh:select """
|
|
784
|
+
SELECT $this ?context (COUNT(DISTINCT ?look) AS ?count)
|
|
785
|
+
WHERE {
|
|
786
|
+
$this arch-vis:inStyleSet ?set .
|
|
787
|
+
?look arch-vis:basedOn $this ;
|
|
788
|
+
arch-vis:inStyleSet ?set ;
|
|
789
|
+
arch:inPresentationContext ?context .
|
|
790
|
+
}
|
|
791
|
+
GROUP BY $this ?context
|
|
792
|
+
HAVING (COUNT(DISTINCT ?look) > 1)
|
|
793
|
+
""" ;
|
|
794
|
+
] ;
|
|
795
|
+
.
|
|
796
|
+
|
|
797
|
+
:StyleSetUseShape
|
|
798
|
+
a sh:NodeShape ;
|
|
799
|
+
sh:targetSubjectsOf arch-vis:usesStyleSet ;
|
|
800
|
+
rdfs:label "Style set use shape"@en ;
|
|
801
|
+
sh:property :StyleSetUseTargetShape ;
|
|
802
|
+
.
|
|
803
|
+
:StyleSetUseTargetShape
|
|
804
|
+
a sh:PropertyShape ;
|
|
805
|
+
sh:path arch-vis:usesStyleSet ;
|
|
806
|
+
sh:nodeKind sh:IRI ;
|
|
807
|
+
sh:class arch-vis:StyleSet ;
|
|
808
|
+
sh:message "arch-vis:usesStyleSet points to arch-vis:StyleSets, read with the model."@en ;
|
|
809
|
+
.
|
|
810
|
+
|
|
811
|
+
:BasedOnShape
|
|
812
|
+
a sh:NodeShape ;
|
|
813
|
+
sh:targetSubjectsOf arch-vis:basedOn ;
|
|
814
|
+
rdfs:label "Based-on shape"@en ;
|
|
815
|
+
sh:property :BasedOnOneShape ;
|
|
816
|
+
# Based on a set's style for every context, or on the look for every context of the concept its diagram element
|
|
817
|
+
# draws: a look for one context is read through the style it is the look of.
|
|
818
|
+
sh:sparql [
|
|
819
|
+
sh:prefixes <https://meta.linked.archi/core-vis-shapes#> ;
|
|
820
|
+
sh:message "{$this} is based on {?base}, which is neither a StyleSet's style for every presentation context (arch-vis:inStyleSet) nor the look for every presentation context of the concept it draws (arch-vis:conceptStyle)."@en ;
|
|
821
|
+
sh:select """
|
|
822
|
+
SELECT $this ?base
|
|
823
|
+
WHERE {
|
|
824
|
+
$this arch-vis:basedOn ?base .
|
|
825
|
+
FILTER NOT EXISTS { ?base arch:inPresentationContext ?context }
|
|
826
|
+
FILTER NOT EXISTS { ?base arch-vis:inStyleSet ?set }
|
|
827
|
+
FILTER NOT EXISTS {
|
|
828
|
+
?drawn arch-vis:style $this .
|
|
829
|
+
?drawn arch-vis:archElement|arch-vis:archRelationship|arch-vis:referencesView ?concept .
|
|
830
|
+
?concept arch-vis:conceptStyle ?base .
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
""" ;
|
|
834
|
+
] ;
|
|
835
|
+
sh:sparql [
|
|
836
|
+
sh:prefixes <https://meta.linked.archi/core-vis-shapes#> ;
|
|
837
|
+
sh:message "{$this} is based on {?base}, a look for one presentation context: a style is based on the style for every context that look is of, and is drawn with it there."@en ;
|
|
838
|
+
sh:select """
|
|
839
|
+
SELECT $this ?base
|
|
840
|
+
WHERE {
|
|
841
|
+
$this arch-vis:basedOn ?base .
|
|
842
|
+
?base arch:inPresentationContext ?context .
|
|
843
|
+
}
|
|
844
|
+
""" ;
|
|
845
|
+
] ;
|
|
846
|
+
.
|
|
847
|
+
:BasedOnOneShape
|
|
848
|
+
a sh:PropertyShape ;
|
|
849
|
+
sh:path arch-vis:basedOn ;
|
|
850
|
+
sh:maxCount 1 ;
|
|
851
|
+
sh:nodeKind sh:IRI ;
|
|
852
|
+
sh:class arch-vis:Style ;
|
|
853
|
+
sh:message "A style is based on at most one arch-vis:Style."@en ;
|
|
854
|
+
.
|
|
855
|
+
|
|
856
|
+
:ConceptStyleUseShape
|
|
857
|
+
a sh:NodeShape ;
|
|
858
|
+
sh:targetSubjectsOf arch-vis:conceptStyle ;
|
|
859
|
+
rdfs:label "Concept style use shape"@en ;
|
|
860
|
+
sh:property :ConceptStyleTargetShape ;
|
|
861
|
+
# At most one look for every presentation context, and one for each, as a diagram element's styles.
|
|
862
|
+
sh:sparql [
|
|
863
|
+
sh:prefixes <https://meta.linked.archi/core-vis-shapes#> ;
|
|
864
|
+
sh:message "{$this} has {?count} looks of its own for {?scope}: at most one for every presentation context, and one for each."@en ;
|
|
865
|
+
sh:select """
|
|
866
|
+
SELECT $this ?scope (COUNT(DISTINCT ?style) AS ?count)
|
|
867
|
+
WHERE {
|
|
868
|
+
$this arch-vis:conceptStyle ?style .
|
|
869
|
+
OPTIONAL { ?style arch:inPresentationContext ?context }
|
|
870
|
+
BIND(COALESCE(STR(?context), "every presentation context") AS ?scope)
|
|
871
|
+
}
|
|
872
|
+
GROUP BY $this ?scope
|
|
873
|
+
HAVING (COUNT(DISTINCT ?style) > 1)
|
|
874
|
+
""" ;
|
|
875
|
+
] ;
|
|
876
|
+
.
|
|
877
|
+
:ConceptStyleTargetShape
|
|
878
|
+
a sh:PropertyShape ;
|
|
879
|
+
sh:path arch-vis:conceptStyle ;
|
|
880
|
+
sh:nodeKind sh:IRI ;
|
|
881
|
+
sh:class arch-vis:Style ;
|
|
882
|
+
sh:message "arch-vis:conceptStyle points to arch-vis:Styles."@en ;
|
|
883
|
+
.
|
|
884
|
+
|
|
885
|
+
:ConceptStyleShape
|
|
886
|
+
a sh:NodeShape ;
|
|
887
|
+
sh:targetObjectsOf arch-vis:conceptStyle ;
|
|
888
|
+
rdfs:label "Concept style shape"@en ;
|
|
889
|
+
sh:property :ConceptStyleBasedOnShape, :ConceptStyleInSetShape ;
|
|
890
|
+
.
|
|
891
|
+
:ConceptStyleBasedOnShape
|
|
892
|
+
a sh:PropertyShape ;
|
|
893
|
+
sh:path arch-vis:basedOn ;
|
|
894
|
+
sh:maxCount 0 ;
|
|
895
|
+
sh:message "A concept's look is based on no other style: what is based on it takes its values from it alone."@en ;
|
|
896
|
+
.
|
|
897
|
+
:ConceptStyleInSetShape
|
|
898
|
+
a sh:PropertyShape ;
|
|
899
|
+
sh:path arch-vis:inStyleSet ;
|
|
900
|
+
sh:maxCount 0 ;
|
|
901
|
+
sh:message "A concept's look is its own, in no StyleSet."@en ;
|
|
902
|
+
.
|
|
903
|
+
|
|
904
|
+
|
|
641
905
|
#################################################################
|
|
642
906
|
# Decoration — the marker a notation renders at a connector end
|
|
643
907
|
#################################################################
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linked.archi/kernel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "The Linked.Archi model kernel: metamodel loading, permitted relationships, IRIs, model changes, diff and merge, SHACL validation and canonical Turtle, shared by la-gram and the Linked.Archi workspace.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"./model-manager/appearance.js": "./src/model-manager/appearance.ts",
|
|
43
43
|
"./model-manager/cascade.js": "./src/model-manager/cascade.ts",
|
|
44
44
|
"./model-manager/clipboard.js": "./src/model-manager/clipboard.ts",
|
|
45
|
+
"./model-manager/concept-styles.js": "./src/model-manager/concept-styles.ts",
|
|
45
46
|
"./model-manager/context-names.js": "./src/model-manager/context-names.ts",
|
|
46
47
|
"./model-manager/custom-properties.js": "./src/model-manager/custom-properties.ts",
|
|
47
48
|
"./model-manager/derivations.js": "./src/model-manager/derivations.ts",
|
|
@@ -76,6 +77,8 @@
|
|
|
76
77
|
"./model-manager/resource-edits.js": "./src/model-manager/resource-edits.ts",
|
|
77
78
|
"./model-manager/short-hash.js": "./src/model-manager/short-hash.ts",
|
|
78
79
|
"./model-manager/snapshot-lines.js": "./src/model-manager/snapshot-lines.ts",
|
|
80
|
+
"./model-manager/style-sets.js": "./src/model-manager/style-sets.ts",
|
|
81
|
+
"./model-manager/style-values.js": "./src/model-manager/style-values.ts",
|
|
79
82
|
"./model-manager/version-history.js": "./src/model-manager/version-history.ts",
|
|
80
83
|
"./model-manager/view-from-results.js": "./src/model-manager/view-from-results.ts",
|
|
81
84
|
"./model-manager/view-manager.js": "./src/model-manager/view-manager.ts",
|
|
@@ -123,7 +126,7 @@
|
|
|
123
126
|
"dependencies": {
|
|
124
127
|
"@rdfjs/types": "^2.0.1",
|
|
125
128
|
"n3": "2.13.12",
|
|
126
|
-
"oxigraph": "0.5.
|
|
129
|
+
"oxigraph": "0.5.13",
|
|
127
130
|
"rdf-validate-shacl": "^0.5.0",
|
|
128
131
|
"@types/n3": "^1.26.1",
|
|
129
132
|
"@types/rdf-validate-shacl": "^0.5.7"
|