SHACL Shapes
https://meta.linked.archi/core-shapes#
Base SHACL shapes for the Linked.Archi core ontology. These shapes apply to all metamodels that extend the core. Metamodel-specific shapes (e.g., ArchiMate, C4, Backstage) import this file and add type-specific constraints. Label requirements are deliberately not here. arch:Element means "a node in a model", and several notations have nodes that are legitimately unnamed — BPMN gateways and events, ArchiMate junctions — so each metamodel states its own naming rule in its own shapes. See the labelling contract in this file and DD-24. Viewpoint conformance is here too: a View declares one viewpoint, its type and contents match what that viewpoint admits, and a viewpoint says what it admits. The rules read the viewpoint definitions from the loaded graph (arch:includesConcept, arch:viewType), so they work for any viewpoint — a language's catalogue, a framework's, or your own.
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
approvalState |
class | ApprovalState | Violation | |
approvalState |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
inPresentationContext |
maxCount | 0 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
inPresentationContext |
maxCount | 0 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
conceptOwner |
class | Stakeholder | Violation | |
conceptOwner |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
inModel |
class | Model | Violation | |
inModel |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
inView |
class | View | Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
optional |
datatype | boolean | Violation | |
optional |
maxCount | 1 |
Violation | |
order |
maxCount | 1 |
Violation | |
path |
maxCount | 1 |
Violation | |
path |
minCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
prefLabel |
datatype | langString | Violation | |
prefLabel |
minCount | 1 |
Violation | |
prefLabel |
pattern | \?$ |
Violation | |
ask |
datatype | string | Violation | |
ask |
maxCount | 1 |
Violation | |
construct |
datatype | string | Violation | |
construct |
maxCount | 1 |
Violation | |
select |
datatype | string | Violation | |
select |
maxCount | 1 |
Violation | |
answers |
datatype | langString | Violation | |
defaultLimit |
datatype | integer | Violation | |
defaultLimit |
maxCount | 1 |
Violation | |
doesNotProve |
datatype | langString | Violation | |
findingFocus |
datatype | string | Violation | |
findingFocus |
maxCount | 1 |
Violation | |
findingFocus |
pattern | ^[A-Za-z_][A-Za-z0-9_]*$ |
Violation | |
findingSeverity |
in | 19957834bca9ad61 |
Violation | |
findingSeverity |
maxCount | 1 |
Violation | |
questionStage |
in | 19957834bca9ad58 |
Violation | |
questionStage |
maxCount | 1 |
Violation | |
questionStage |
minCount | 1 |
Violation | |
requiresDataset |
in | 19957834bca9ad6a |
Violation | |
requiresDataset |
maxCount | 1 |
Violation | |
resultIsFinding |
datatype | boolean | Violation | |
resultIsFinding |
maxCount | 1 |
Violation | |
resultIsFinding |
minCount | 1 |
Violation | |
resultKey |
datatype | string | Violation | |
resultKey |
maxCount | 1 |
Violation |
SELECT $this ?context ?language (COUNT(DISTINCT ?name) AS ?count)
WHERE {
$this skosxl:altLabel ?name .
?name arch:inPresentationContext ?context ;
skosxl:literalForm ?form .
BIND(LANG(?form) AS ?language)
}
GROUP BY $this ?context ?language
HAVING (COUNT(DISTINCT ?name) > 1)
SELECT $this ?context (COUNT(DISTINCT ?picture) AS ?count)
WHERE {
$this arch:altVisNotation ?picture .
?picture arch:inPresentationContext ?context .
}
GROUP BY $this ?context
HAVING (COUNT(DISTINCT ?picture) > 1)
SELECT $this ?picture ?context
WHERE {
$this arch:altVisNotation ?picture .
?picture arch:inPresentationContext ?context .
FILTER NOT EXISTS { ?picture schema:contentUrl ?url }
}
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
contentUrl |
datatype | anyURI | Violation | |
contentUrl |
maxCount | 1 |
Violation | |
inPresentationContext |
maxCount | 1 |
Violation |
SELECT $this ?form
WHERE {
$this skosxl:altLabel ?name .
?name skosxl:literalForm ?form .
FILTER NOT EXISTS { $this skos:altLabel ?form }
}
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
literalForm |
datatype | langString | Violation | |
literalForm |
maxCount | 1 |
Violation | |
literalForm |
minCount | 1 |
Violation | |
inPresentationContext |
maxCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
source |
class | ModelConcept | Violation | |
source |
maxCount | 1 |
Violation | |
source |
minCount | 1 |
Violation | |
target |
class | ModelConcept | Violation | |
target |
maxCount | 1 |
Violation | |
target |
minCount | 1 |
Violation |
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
title |
minCount | 1 |
Violation | |
preferredNamespacePrefix |
maxCount | 1 |
Violation | |
preferredNamespacePrefix |
minCount | 1 |
Violation | |
preferredNamespaceUri |
maxCount | 1 |
Violation | |
preferredNamespaceUri |
minCount | 1 |
Violation |
SELECT $this ?vp ?rel ?endpoint ?endpointType
WHERE {
$this arch:viewConformsToViewpoint ?vp .
?rel arch:inView $this .
?rel a/rdfs:subClassOf* arch:QualifiedRelationship .
{ ?rel arch:source ?endpoint . }
UNION
{ ?rel arch:target ?endpoint . }
?endpoint rdf:type ?endpointType .
?endpointType rdfs:subClassOf* arch:Element .
FILTER(?endpointType != arch:Element)
FILTER EXISTS { ?vp arch:includesConcept ?anyConcept . }
# MINUS, not FILTER NOT EXISTS: the same results (?endpoint and ?vp are bound
# above), and much faster on a large model.
MINUS {
?endpoint rdf:type/rdfs:subClassOf* ?allowedType .
?vp arch:includesConcept ?allowedType .
}
}
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
viewConformsToViewpoint |
class | Viewpoint | Warning | |
viewConformsToViewpoint |
maxCount | 1 |
Warning | |
viewConformsToViewpoint |
minCount | 1 |
Warning |
SELECT $this ?vp ?element ?elementType WHERE {
$this arch:viewConformsToViewpoint ?vp .
?element arch:inView $this .
?element rdf:type ?elementType .
?elementType rdfs:subClassOf* arch:Element .
FILTER(?elementType != arch:Element)
FILTER EXISTS { ?vp arch:includesConcept ?anyConcept . }
# MINUS, not FILTER NOT EXISTS: the same results (?element and ?vp are bound
# above), and much faster on a large model.
MINUS {
?element rdf:type/rdfs:subClassOf* ?allowedType .
?vp arch:includesConcept ?allowedType .
}
}
SELECT $this ?vp ?viewType
WHERE {
$this arch:viewConformsToViewpoint ?vp .
$this rdf:type ?viewType .
?viewType rdfs:subClassOf* arch:View .
FILTER(?viewType != arch:View)
FILTER NOT EXISTS {
?vp arch:viewType ?allowedType .
?viewType rdfs:subClassOf* ?allowedType .
}
FILTER EXISTS {
?vp arch:viewType ?anyType .
}
}
| Property | Constraint | Value | Severity | Message |
|---|---|---|---|---|
includesConcept |
minCount | 1 |
Info | |
viewType |
minCount | 1 |
Info | |
viewpointFramesConcern |
minCount | 1 |
Info |