@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
  a sh:NodeShape ;
    sh:targetClass owl:Ontology ;
  sh:property sarefsh:versionIRI ;
  sh:property sarefsh:versionInfo ;
  sh:property sarefsh:priorVersion ;
  sh:property sarefsh:imports ;
  sh:property sarefsh:preferredNamespacePrefix ;
  sh:property sarefsh:preferredNamespaceUri .

sarefsh:versionIRI sh:path owl:versionIRI ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:IRI ;
  sh:minCount 1 ;
  sh:maxCount 1 .

sarefsh:versionInfo sh:path owl:versionInfo ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:Literal ;
  sh:datatype xsd:string ;
  sh:minCount 1 ;
  sh:maxCount 1 .

sarefsh:priorVersion sh:path owl:priorVersion ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:IRI .

sarefsh:imports sh:path owl:imports ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:IRI ;
  sh:pattern "^https://saref.etsi.org/(core|saref4[a-z]{4})/v[0-9]+\\.[0-9]+\\.[0-9]+/$" .

sarefsh:preferredNamespacePrefix sh:path vann:preferredNamespacePrefix ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:Literal ;
  sh:datatype xsd:string ;
  sh:minCount 1 ;
  sh:maxCount 1 .

sarefsh:preferredNamespaceUri sh:path vann:preferredNamespaceUri ;
  sh:severity sh:Violation ;
  sh:nodeKind sh:Literal ;
  sh:datatype xsd:string ;
  sh:minCount 1 ;
  sh:maxCount 1 .

