@prefix sh:      <http://www.w3.org/ns/shacl#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix statfyi: <https://statfyi.com/ontology/> .

# ── Every skos:Concept must have a prefLabel ──────────────────────────────

<#ConceptShape>
    a sh:NodeShape ;
    sh:targetClass skos:Concept ;
    sh:property [
        sh:path skos:prefLabel ;
        sh:minCount 1 ;
        sh:datatype xsd:string ;
        sh:message "Every concept must have at least one skos:prefLabel" ;
    ] ;
    sh:property [
        sh:path skos:inScheme ;
        sh:minCount 1 ;
        sh:message "Every concept must belong to a scheme (skos:inScheme)" ;
    ] ;
    sh:property [
        sh:path skos:broader ;
        sh:class skos:Concept ;
        sh:message "skos:broader must reference an existing skos:Concept" ;
    ] ;
    sh:property [
        sh:path statfyi:nodeKind ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:in ( "entity" "process" "event" "attribute" "rule" "system" "concept" "metric" ) ;
        sh:message "statfyi:nodeKind must be one of the 8 defined node kinds" ;
    ] .

# ── ConceptScheme must have a prefLabel ───────────────────────────────────

<#ConceptSchemeShape>
    a sh:NodeShape ;
    sh:targetClass skos:ConceptScheme ;
    sh:property [
        sh:path skos:prefLabel ;
        sh:minCount 1 ;
        sh:message "Concept scheme must have a skos:prefLabel" ;
    ] .
