diff --git a/pmd4/src/rdf-validator-suite.edn b/pmd4/src/rdf-validator-suite.edn index e2e2c63..a6d60bf 100644 --- a/pmd4/src/rdf-validator-suite.edn +++ b/pmd4/src/rdf-validator-suite.edn @@ -61,6 +61,10 @@ :source "swirrl/validations/pmd4/SELECT_DatasetExactlyOneModifiedDate.sparql" :type :sparql :name "DatasetExactlyOneModifiedDate"} +{ + :source "swirrl/validations/pmd4/SELECT_DatasetGraphContainsContents.sparql" + :type :sparql + :name "DatasetGraphContainsContents"} { :source "swirrl/validations/pmd4/SELECT_DatasetGraphIsIri.sparql" :type :sparql diff --git a/pmd4/src/swirrl/validations/pmd4/SELECT_DatasetGraphContainsContents.sparql b/pmd4/src/swirrl/validations/pmd4/SELECT_DatasetGraphContainsContents.sparql new file mode 100644 index 0000000..da31e0c --- /dev/null +++ b/pmd4/src/swirrl/validations/pmd4/SELECT_DatasetGraphContainsContents.sparql @@ -0,0 +1,21 @@ +PREFIX pmdcat: + +# pmdcat:datasetContents should either be in one of the pmdcat:graphs or the same thing + +SELECT ?dataset ?contents { + ?dataset a pmdcat:Dataset; + pmdcat:datasetContents ?contents; + . + + FILTER NOT EXISTS { + ?dataset pmdcat:graph ?graph . + + GRAPH ?graph { + ?contents ?p ?o . + } + } + + MINUS { + ?dataset pmdcat:graph ?contents + } +} \ No newline at end of file