Linked.Archi

Linked.Archi Core SHACL Shapes

SHACL Shapes

https://meta.linked.archi/core-shapes#

v0.4.0 draft archsh: Kalin Maldzhanski Linked.Archi Modified: 2026-11-08 License

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.

Contents

ApprovalStateShape

PropertyConstraintValueSeverityMessage
approvalState class ApprovalState Violation
approvalState maxCount 1 Violation

CanonicalNameForEveryContextShape

PropertyConstraintValueSeverityMessage
inPresentationContext maxCount 0 Violation

CanonicalPictureShape

PropertyConstraintValueSeverityMessage
inPresentationContext maxCount 0 Violation

ConceptOwnerShape — target: ModelConcept

PropertyConstraintValueSeverityMessage
conceptOwner class Stakeholder Violation
conceptOwner maxCount 1 Violation

InModelShape

PropertyConstraintValueSeverityMessage
inModel class Model Violation
inModel maxCount 1 Violation

InViewShape

PropertyConstraintValueSeverityMessage
inView class View Violation

ModelQuestionFindingShape — target: ModelQuestion

ModelQuestionListingShape — target: ModelQuestion

ModelQuestionParameterShape

PropertyConstraintValueSeverityMessage
optional datatype boolean Violation
optional maxCount 1 Violation
order maxCount 1 Violation
path maxCount 1 Violation
path minCount 1 Violation

ModelQuestionQueryShape — target: ModelQuestion

ModelQuestionShape — target: ModelQuestion

PropertyConstraintValueSeverityMessage
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

OneNamePerContextShape

SPARQL constraint: {$this} has {?count} names for presentation context {?context} in language "{?language}": it may have one. 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)
        

PictureForAudienceShape

SPARQL constraint: {$this} has {?count} pictures for presentation context {?context}: it may have one. Violation
            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)
        
SPARQL constraint: {$this}'s picture {?picture} is for presentation context {?context} but has no schema:contentUrl. Violation
            SELECT $this ?picture ?context
            WHERE {
                $this arch:altVisNotation ?picture .
                ?picture arch:inPresentationContext ?context .
                FILTER NOT EXISTS { ?picture schema:contentUrl ?url }
            }
        

PictureShape — target: ImageObject

PropertyConstraintValueSeverityMessage
contentUrl datatype anyURI Violation
contentUrl maxCount 1 Violation
inPresentationContext maxCount 1 Violation

PresentationNameAlsoPlainShape

SPARQL constraint: {$this}'s name {?form} is not also its skos:altLabel: tools that read plain SKOS do not see it. Warning
            SELECT $this ?form
            WHERE {
                $this skosxl:altLabel ?name .
                ?name skosxl:literalForm ?form .
                FILTER NOT EXISTS { $this skos:altLabel ?form }
            }
        

PresentationNameShape — target: Label

PropertyConstraintValueSeverityMessage
literalForm datatype langString Violation
literalForm maxCount 1 Violation
literalForm minCount 1 Violation
inPresentationContext maxCount 1 Violation

QualifiedRelationshipShape — target: QualifiedRelationship

PropertyConstraintValueSeverityMessage
source class ModelConcept Violation
source maxCount 1 Violation
source minCount 1 Violation
target class ModelConcept Violation
target maxCount 1 Violation
target minCount 1 Violation

QuestionSetShape — target: QuestionSet

PropertyConstraintValueSeverityMessage
title minCount 1 Violation
preferredNamespacePrefix maxCount 1 Violation
preferredNamespacePrefix minCount 1 Violation
preferredNamespaceUri maxCount 1 Violation
preferredNamespaceUri minCount 1 Violation

RelationshipEndpointConformanceShape — target: View

SPARQL constraint: Relationship {?rel} in view has endpoint {?endpoint} of type {?endpointType} not in viewpoint {?vp} palette. Info
            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 .
                }
            }
        

ViewDeclaresViewpointShape — target: View

PropertyConstraintValueSeverityMessage
viewConformsToViewpoint class Viewpoint Warning
viewConformsToViewpoint maxCount 1 Warning
viewConformsToViewpoint minCount 1 Warning

ViewElementConformanceShape — target: View

SPARQL constraint: Element {?element} of type {?elementType} is not allowed in viewpoint {?vp} (not in arch:includesConcept). 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 .
                }
            }
        

ViewTypeConformanceShape — target: View

SPARQL constraint: View type {?viewType} does not match any arch:viewType declared by viewpoint {?vp}. Warning
            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 .
                }
            }
        

ViewpointCompletenessShape — target: Viewpoint

PropertyConstraintValueSeverityMessage
includesConcept minCount 1 Info
viewType minCount 1 Info
viewpointFramesConcern minCount 1 Info