@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix cv: <http://data.europa.eu/m8g/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix shape: <https://example.org/dc-hcv/shapes/> .

# Local profile constraints, not the official CCCEV conformance shapes.
shape:NodeShape a sh:NodeShape ;
    sh:targetClass cv:Criterion, cv:InformationRequirement, cv:InformationConcept,
        cv:Constraint, cv:EvidenceTypeList, cv:EvidenceType, cv:ReferenceFramework,
        cv:Evidence, cv:SupportedValue ;
    sh:nodeKind sh:IRI ;
    sh:property [
        sh:path dct:title ; sh:minCount 1 ; sh:maxCount 1 ;
        sh:datatype xsd:string ; sh:minLength 1 ;
        sh:message "Profile nodes require exactly one nonempty title." ;
    ] ;
    sh:property [ sh:path cv:hasConcept ; sh:nodeKind sh:IRI ; sh:class cv:InformationConcept ] ;
    sh:property [ sh:path cv:hasEvidenceTypeList ; sh:nodeKind sh:IRI ; sh:class cv:EvidenceTypeList ] ;
    sh:property [ sh:path cv:specifiesEvidenceType ; sh:nodeKind sh:IRI ; sh:class cv:EvidenceType ] ;
    sh:property [ sh:path cv:constrains ; sh:nodeKind sh:IRI ; sh:class cv:InformationConcept ] ;
    sh:property [ sh:path cv:isDerivedFrom ; sh:nodeKind sh:IRI ; sh:class cv:ReferenceFramework ] ;
    sh:property [ sh:path cv:supportsConcept ; sh:nodeKind sh:IRI ; sh:class cv:InformationConcept ] ;
    sh:property [ sh:path cv:supportsValue ; sh:nodeKind sh:IRI ; sh:class cv:SupportedValue ] ;
    sh:property [
        sh:path cv:hasRequirement ; sh:nodeKind sh:IRI ;
        sh:or ( [ sh:class cv:Criterion ] [ sh:class cv:InformationRequirement ] [ sh:class cv:Constraint ] ) ;
    ] ;
    sh:property [
        sh:path cv:supportsRequirement ; sh:nodeKind sh:IRI ;
        sh:or ( [ sh:class cv:Criterion ] [ sh:class cv:InformationRequirement ] [ sh:class cv:Constraint ] ) ;
    ] .

shape:EvidenceRouteShape a sh:NodeShape ;
    sh:targetClass cv:EvidenceTypeList ;
    sh:property [
        sh:path cv:specifiesEvidenceType ; sh:minCount 1 ;
        sh:message "An evidence route must specify at least one evidence type." ;
    ] .
