science-on-schema.org
science-on-schema.org copied to clipboard
Add SHACL check for presence of at least one SO:Dataset
The current SHACL rules https://github.com/ESIPFed/science-on-schema.org/blob/main/validation/shapegraphs/soso_common_v1.2.3.ttl do not check for the presence of at least one Dataset and so report a data graph with no Dataset instances as conforming. This can be misleading.
Solution is to add a check such as:
soso:DatasetNS0Shape
a sh:NodeShape ;
sh:targetNode SO:Dataset ;
sh:message "Expecting at least one SO:Dataset"@en ;
sh:property [
sh:path [ sh:inversePath rdf:type ] ;
sh:minCount 1 ;
] .
which fails if there is not at least one Dataset in the data graph.