SHACL Shapes
https://meta.linked.archi/core-vis-shapes#
SHACL shapes for the Linked.Archi diagram and visual notation layer (core-vis). Constrains the diagram interchange classes — ArchNode, LabelNode, ContainerNode, Link, Point, PointList — and the type-level notation classes NotationSet, VisualNotation and Style. Until 0.1.0 the diagram layer had no shapes at all: a validate run loaded the notation's own shapes and the core shapes, none of which target a core-vis class, so nothing checked that a diagram node referenced a model element, that it belonged to a view, or that an edge had endpoints. A corpus of 447 malformed diagram resources across 20 diagrams validated clean. The two load-bearing rules here are ArchNodeShape (a diagram node that claims to stand for a model element must say which one) and PlacedDiagElementShape (a shape or edge must belong to exactly one view); the remainder is cardinality and datatype hygiene.
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
archElement |
maxCount | 1 |
Violation | |
archElement |
minCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
decorSymbol |
datatype | anyURI | Violation | |
decorSymbol |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
label |
class | LabelNode | Violation | |
label |
maxCount | 1 |
Violation | |
style |
class | Style | Violation | |
view |
class | View | Violation | |
view |
maxCount | 1 |
Violation |
SELECT $this ?scope (COUNT(DISTINCT ?style) AS ?count)
WHERE {
$this arch-vis:style ?style .
OPTIONAL { ?style arch:inPresentationContext ?context }
BIND(COALESCE(STR(?context), "every presentation context") AS ?scope)
}
GROUP BY $this ?scope
HAVING (COUNT(DISTINCT ?style) > 1)
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
inPresentationContext |
maxCount | 1 |
Violation | |
expression |
datatype | string | Violation | |
expression |
maxCount | 1 |
Violation | |
expression |
minCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
labelExpression |
class | LabelExpression | Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
archElement |
maxCount | 0 |
Violation | |
label |
maxCount | 0 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
archRelationship |
class | QualifiedRelationship | Violation | |
archRelationship |
maxCount | 1 |
Violation | |
points |
maxCount | 1 |
Violation | |
source |
maxCount | 1 |
Violation | |
source |
minCount | 1 |
Violation | |
target |
maxCount | 1 |
Violation | |
target |
minCount | 1 |
Violation | |
source |
sh:or class | Link | Node | Violation | A Link has exactly one arch-vis:source, and it must be a Node or another Link. |
target |
sh:or class | Link | Node | Violation | A Link has exactly one arch-vis:target, and it must be a Node or another Link. |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
inNode |
class | Node | Violation | |
inNode |
maxCount | 1 |
Violation |
SELECT $this ?value
WHERE {
$this arch-vis:inNode ?value .
{ $this arch-vis:view ?view . ?value arch-vis:view ?other . FILTER(?view != ?other) }
UNION
{ $this arch-vis:inNode+ $this . }
}
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
bounds-h |
datatype | double | Violation | |
bounds-h |
maxCount | 1 |
Violation | |
bounds-w |
datatype | double | Violation | |
bounds-w |
maxCount | 1 |
Violation | |
bounds-x |
datatype | double | Violation | |
bounds-x |
maxCount | 1 |
Violation | |
bounds-y |
datatype | double | Violation | |
bounds-y |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
contentBox |
datatype | string | Violation | |
contentBox |
maxCount | 1 |
Violation | |
detailPath |
datatype | string | Violation | |
detailPath |
maxCount | 1 |
Violation | |
fallbackShape |
in | f0122114286874e |
Violation | |
fallbackShape |
maxCount | 1 |
Violation | |
fallbackShape |
minCount | 1 |
Violation | |
labelBox |
datatype | string | Violation | |
labelBox |
maxCount | 1 |
Violation | |
outlinePath |
datatype | string | Violation | |
outlinePath |
maxCount | 1 |
Violation | |
shapeVariables |
datatype | string | Violation | |
shapeVariables |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
view |
class | View | Violation | |
view |
class | View | Violation | |
view |
maxCount | 1 |
Violation | |
view |
maxCount | 1 |
Violation | |
view |
minCount | 1 |
Violation | |
view |
minCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
point-x |
datatype | double | Violation | |
point-x |
maxCount | 1 |
Violation | |
point-x |
minCount | 1 |
Violation | |
point-y |
datatype | double | Violation | |
point-y |
maxCount | 1 |
Violation | |
point-y |
minCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
lineStyle |
class | LineStyle | Violation | |
lineStyle |
maxCount | 1 |
Violation | |
sourceDecor |
class | Decoration | Violation | |
sourceDecor |
maxCount | 1 |
Violation | |
targetDecor |
class | Decoration | Violation | |
targetDecor |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
inPresentationContext |
maxCount | 1 |
Violation | |
borderStyle |
class | LineStyle | Violation | |
borderStyle |
maxCount | 1 |
Violation | |
defaultHeight |
datatype | double | Violation | |
defaultHeight |
maxCount | 1 |
Violation | |
defaultWidth |
datatype | double | Violation | |
defaultWidth |
maxCount | 1 |
Violation | |
fillColor |
datatype | string | Violation | |
fillColor |
maxCount | 1 |
Violation | |
fontColor |
datatype | string | Violation | |
fontColor |
maxCount | 1 |
Violation | |
fontName |
datatype | string | Violation | |
fontName |
maxCount | 1 |
Violation | |
fontSize |
datatype | integer | Violation | |
fontSize |
maxCount | 1 |
Violation | |
fontStyle |
datatype | string | Violation | |
fontStyle |
maxCount | 1 |
Violation | |
fontStyle |
pattern | ^(bold|italic|underline)( (bold|italic|underline))*$ |
Violation | |
gradient |
class | Gradient | Violation | |
gradient |
maxCount | 1 |
Violation | |
iconColor |
datatype | string | Violation | |
iconColor |
maxCount | 1 |
Violation | |
iconPlacement |
class | IconPlacement | Violation | |
iconPlacement |
maxCount | 1 |
Violation | |
iconSymbol |
datatype | anyURI | Violation | |
iconSymbol |
maxCount | 1 |
Violation | |
image |
datatype | anyURI | Violation | |
image |
maxCount | 1 |
Violation | |
imagePosition |
class | IconPlacement | Violation | |
imagePosition |
maxCount | 1 |
Violation | |
labelAnchor |
class | LabelAnchor | Violation | |
labelAnchor |
maxCount | 1 |
Violation | |
lineColor |
datatype | string | Violation | |
lineColor |
maxCount | 1 |
Violation | |
lineStyle |
class | LineStyle | Violation | |
lineStyle |
maxCount | 1 |
Violation | |
lineWidth |
datatype | integer | Violation | |
lineWidth |
maxCount | 1 |
Violation | |
renderingMode |
class | RenderingMode | Violation | |
renderingMode |
maxCount | 1 |
Violation | |
shapeType |
class | ShapeType | Violation | |
shapeType |
maxCount | 1 |
Violation | |
sourceDecor |
class | Decoration | Violation | |
sourceDecor |
maxCount | 1 |
Violation | |
targetDecor |
class | Decoration | Violation | |
targetDecor |
maxCount | 1 |
Violation | |
textAlignment |
class | TextAlignment | Violation | |
textAlignment |
maxCount | 1 |
Violation | |
textPosition |
class | TextPosition | Violation | |
textPosition |
maxCount | 1 |
Violation | |
useElementPicture |
datatype | boolean | Violation | |
useElementPicture |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
alternativeStyle |
class | Style | Violation | |
defaultStyle |
class | Style | Violation | |
defaultStyle |
maxCount | 1 |
Violation | |
inNotationSet |
class | NotationSet | Violation | |
inNotationSet |
minCount | 1 |
Violation | |
labelAnchor |
class | LabelAnchor | Violation | |
labelAnchor |
maxCount | 1 |
Violation | |
nestedEnd |
in | f01221142868748 |
Violation | |
nestedEnd |
maxCount | 2 |
Violation | |
notationFor |
maxCount | 1 |
Violation | |
notationFor |
minCount | 1 |
Violation |