@prefix dash: <http://datashapes.org/dash#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix sarefsh: <https://saref.etsi.org/shape#> .
@prefix schema: <http://schema.org/> .

sarefsh:OntologyShape
  sh:severity sh:Violation ;
  a sh:NodeShape ;
    sh:targetClass owl:Ontology ;
  sh:property sarefsh:creator1, sarefsh:creator2 ;
  sh:property sarefsh:contributor1, sarefsh:contributor2 .

sarefsh:creator1 sh:path dcterms:creator ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:BlankNodeOrIRI ;
  sh:minCount 1 .

sarefsh:creator2  sh:path dcterms:creator ;
  sh:severity sh:Violation ;
  sh:or ( [ sh:nodeKind sh:IRI ] sarefsh:PersonShape  ) .

sarefsh:contributor1 sh:path dcterms:contributor ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:BlankNodeOrIRI ;
  sh:minCount 0 .

sarefsh:contributor2  sh:path dcterms:contributor ;
  sh:severity sh:Violation ;
  sh:or ( [ sh:nodeKind sh:IRI ] sarefsh:PersonShape  ) .

sarefsh:PersonShape
  a sh:NodeShape ;
  sh:targetClass schema:Person ;
  sh:severity sh:Warning ;
  sh:property sarefsh:givenName ;
  sh:property sarefsh:familyName ;
  sh:property sarefsh:affiliation1, sarefsh:affiliation2 , sarefsh:affiliation3 .


sarefsh:givenName sh:path schema:givenName ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:Literal ;
  sh:minCount 1 ;
  sh:maxCount 1 ;
  sh:or (
    [ sh:datatype rdf:langString ]
    [ sh:datatype xsd:string ] ) .

sarefsh:familyName sh:path schema:familyName ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:Literal ;
  sh:minCount 1 ;
  sh:maxCount 1 ;
  sh:or (
    [ sh:datatype rdf:langString ]
    [ sh:datatype xsd:string ] ) .


sarefsh:affiliation1 sh:path schema:affiliation ;
  sh:severity sh:Warning ;
  sh:minCount 1 .

sarefsh:affiliation2 sh:path schema:affiliation ;
  sh:severity sh:Violation ;
  sh:maxCount 1 .

sarefsh:affiliation3 sh:path schema:affiliation ;
  sh:nodeKind sh:BlankNodeOrIRI ;
  sh:severity sh:Violation ;
  sh:or ( [ sh:nodeKind sh:IRI ] sarefsh:AffiliationShape  ) .


sarefsh:AffiliationShape
  a sh:NodeShape ;
  sh:targetClass schema:Organization ;
  sh:severity sh:Warning ;
  sh:property sarefsh:name .

sarefsh:name sh:path schema:name ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:Literal ;
  sh:minCount 1 ;
  sh:maxCount 1 ;
  sh:or (
    [ sh:datatype rdf:langString ]
    [ sh:datatype xsd:string ] ) .

