@prefix sh:     <http://www.w3.org/ns/shacl#> .
@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .
@prefix sh_sec: <https://secorolab.github.io/metamodels/website/> .
@prefix news:   <https://secorolab.github.io/metamodels/website/news#> .

sh_sec:NewsShape
    a sh:NodeShape ;
    sh:targetClass news:NewsArticle ;
    sh:closed false ;

    sh:property [
        sh:path     news:name ;
        sh:datatype xsd:string ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
        sh:minLength 3 ;
        sh:severity sh:Violation ;
        sh:message  "News article must have a title." ;
    ] ;

    sh:property [
        sh:path     news:description ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:severity sh:Warning ;
        sh:message  "News article should have a description." ;
    ] ;

    sh:property [
        sh:path     news:date-published ;
        sh:datatype xsd:date ;
        sh:maxCount 1 ;
        sh:severity sh:Warning ;
        sh:message  "date-published should be a valid xsd:date." ;
    ] ;

    sh:property [
        sh:path     news:url ;
        sh:nodeKind sh:IRI ;
        sh:maxCount 1 ;
    ] ;

    sh:property [
        sh:path     news:about ;
        sh:nodeKind sh:IRI ;
    ] ;

    sh:property [
        sh:path     news:keywords ;
        sh:datatype xsd:string ;
    ] ;
.
