Commit 3430daf4 authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

updated shapes according to call 16/04/2020

parent 9ade4da7
Loading
Loading
Loading
Loading
+176 −145
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
sarefsh:OntologyShape
  a sh:NodeShape ;
    sh:targetClass owl:Ontology ;
	  sh:closed	true ;
  sh:property [
    sh:path rdf:type ;
    sh:minCount 1 ;
@@ -20,52 +19,59 @@ sarefsh:OntologyShape
  ] ;
  sh:property [
    sh:path owl:versionInfo ;
		sh:maxCount 0 ;
    sh:nodeKind sh:Literal ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
		sh:message "The annotation owl:versionInfo should not be set in the source file, as it will be computed automatically"
    sh:message "The annotation owl:versionInfo shall be set in the source file it should be equal to <<<<chomtute this automatically>>>>" ;
    sh:patten "<<<<compute this automatically before checking the ontology against this shape>>>>"
  ] ;
  sh:property [
    sh:path owl:versionIRI ;
		sh:maxCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
		sh:message "The annotation owl:versionIRI should not be set in the source file, as it will be computed automatically"
    sh:message "The annotation owl:versionIRI shall be set in the source file it should be equal to <<<<chomtute this automatically>>>>" ;
    sh:patten "<<<<compute this automatically before checking the ontology against this shape>>>>"
  ] ;
  sh:property [
    sh:path owl:priorVersion ;
    sh:nodeKind sh:IRI ;
    sh:maxCount 0 ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
		sh:message "The annotation owl:priorVersion should not be set in the source file, as it will be computed automatically"
    sh:message "The annotation owl:priorVersion should not be set in the source file, as it will be computed automatically" ;
    sh:patten "<<<<compute this automatically ---- this will be challenging >>>>" ;
  ] ;
  sh:property [
    sh:path owl:imports ;
    sh:nodeKind sh:IRI ;
		sh:pattern "^https://saref.etsi.org/(core|saref4[a-z]{4})/v[1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*/$" ;
		sh:severity sh:Violation ;
		sh:message "Only SAREF ontologies with specific versions shall be imported. Their URIs conform to the regular expression `^https://saref.etsi.org/(core|saref4[a-z]{4})/v[1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*/$`"
    sh:pattern "^https://saref.etsi.org/(core|saref4[a-z]{4})/" ;
    sh:severity sh:Warning ;
    sh:message "Only SAREF ontologies with specific versions shall be imported. Their URIs starts with `^https://saref.etsi.org/(core|saref4[a-z]{4})/`"
  ] ;
  sh:property [ 
    sh:path dcterms:title ;
    sh:nodeKind sh:Literal ;
    sh:minCount 1 ;
		sh:maxCount 1 ;
		sh:severity sh:Violation ;
		sh:message "The ontology shall have exactly one <http://purl.org/dc/terms/title>"
    sh:severity sh:Warning ;
    sh:message """"The ontology document shall contain at least one metadata `dcterms:title` 
Each value for this metadata shall be a literal with datatype IRI `xsd:string` or `xsd:langString`
There should be at least one value with the `xsd:langString` datatype and the en language.
(See ETSI TS 103 673 Clause 9.4.3.2 for more details)"""
  ] ;  
  sh:property [ 
    sh:path dcterms:abstract ;
    sh:nodeKind sh:Literal ;
		sh:minCount 1 ;
		sh:maxCount 1 ;
		sh:severity sh:Warning ;
		sh:message "The ontology should have exactly one <http://purl.org/dc/terms/abstract>"
    sh:minCount 0 ;
  ] ;
  sh:property [
    sh:path dcterms:description ;
    sh:nodeKind sh:Literal ;
    sh:minCount 1 ;
		sh:maxCount 1 ;
    sh:severity sh:Warning ;
		sh:message "The ontology should have exactly one <http://purl.org/dc/terms/description>"
    sh:message "The ontology should have exactly at least <http://purl.org/dc/terms/description>"
  ] ;
  sh:property [
    sh:path rdfs:comment ;
@@ -75,27 +81,44 @@ sarefsh:OntologyShape
  sh:property [
    sh:path dcterms:issued ;
    sh:datatype xsd:date ;
		sh:minCount 0 ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
    sh:message "A metadata <http://purl.org/dc/terms/issued> with datatype `xsd:date` is recommended."
  ] ;
  sh:property [
    sh:path dcterms:modified ;
    sh:datatype xsd:date ;
		sh:maxCount 0 ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
		sh:message "The annotation <http://purl.org/dc/terms/modified> will be computed automatically"
    sh:message "A metadata <http://purl.org/dc/terms/modified> with datatype `xsd:date` is recommended."
    # do not check that the modified date is the date of today. 
    # do not generate it automatically 
  ] ;
  sh:property [
    sh:path dcterms:source ;
		sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:minCount 1 ; # dct:source <https://forge.etsi.org/rep/saref/saref4inma> ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
    sh:message "A metadata <http://purl.org/dc/terms/source> should point to the Technical Specification  <<<update this >>>"
  ] ;
  sh:property [
    sh:path rdfs:seeAlso ;
    sh:nodeKind sh:IRI ;
    sh:minCount 1 ; # <https://www.etsi.org/deliver/etsi_ts/103400_103499/10341005/01.01.01_60/ts_10341005v010101p.pdf> ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
    sh:message "The link to the corresponding TS <<<update this >>>"
  ] ;
  sh:property [
    sh:path dcterms:license ;
    sh:nodeKind sh:IRI ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:pattern "https://forge.etsi.org/etsi-software-license" ;
		sh:severity sh:Violation ;
    sh:severity sh:Warning ;
    sh:message "There shall be at least one annotation <http://purl.org/dc/terms/license> <https://forge.etsi.org/etsi-software-license>"
  ] ;
  sh:property [
@@ -126,21 +149,28 @@ sarefsh:OntologyShape
  ] ;
  sh:property [
    sh:path dcterms:publisher ;
		sh:maxCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:pattern "https://www.etsi.org/" ;
    sh:severity sh:Warning ;
		sh:message "The annotation <http://purl.org/dc/terms/publisher> will be computed automatically"
    sh:message "There shall be at least one annotation <http://purl.org/dc/terms/publisher> <https://www.etsi.org/>"
  ] ;
  sh:property [
    sh:path vann:preferredNamespacePrefix ;
		sh:maxCount 0 ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
		sh:message "The annotation <http://purl.org/vocab/vann/preferredNamespacePrefix> will be computed automatically"
    sh:message "The annotation <http://purl.org/vocab/vann/preferredNamespacePrefix>   <<<<compute this automatically ---- this will be challenging >>>>" ;
    sh:patten "<<<<compute this automatically ---- this will be challenging >>>>"
  ] ;
  sh:property [
    sh:path vann:preferredNamespaceUri ;
		sh:maxCount 0 ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:severity sh:Warning ;
		sh:message "The annotation <http://purl.org/vocab/vann/preferredNamespaceUri> will be computed automatically"
    sh:message "The annotation <http://purl.org/vocab/vann/preferredNamespaceUri>   <<<<compute this automatically ---- this will be challenging >>>> " ;
    sh:patten "<<<<compute this automatically ---- this will be challenging >>>>"
  ] .
  
sarefsh:PersonShape
@@ -190,6 +220,7 @@ sarefsh:AffiliationShape
    sh:severity sh:Warning ;
    sh:message "The affiliation of each contributor should have at least one <http://schema.org/name>"
  ] . 

[] a sh:NodeShape ;
  sh:targetClass owl:Class,  owl:ObjectProperty, owl:DatatypeProperty , owl:NamedIndividual;
  sh:message "The following terms do not have at least one rdfs:label" ;