From 113e4c75167f40166681a54dd6c9e56f9222869d Mon Sep 17 00:00:00 2001 From: Ian Nesbitt Date: Thu, 9 Apr 2026 11:47:34 -0700 Subject: [PATCH 1/2] Adding filter to exclude a case where multiple values can be returned for `SO:datePublished` --- src/main/resources/application-context-schema-org.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/application-context-schema-org.xml b/src/main/resources/application-context-schema-org.xml index 448f306e..01195265 100644 --- a/src/main/resources/application-context-schema-org.xml +++ b/src/main/resources/application-context-schema-org.xml @@ -183,6 +183,7 @@ ?datasetId SO:datePublished ?datePublished # Don't include referenced sub-Datasets (i.e. a Dataset in a 'hasPart' property) FILTER NOT EXISTS { ?id SO:hasPart ?datasetId . } + FILTER NOT EXISTS { ?id SO:workExample ?datasetId . } } ]]> From 461f2db13af4089e62091d7a27a98a16fcfe7801 Mon Sep 17 00:00:00 2001 From: Ian Nesbitt Date: Thu, 9 Apr 2026 12:45:03 -0700 Subject: [PATCH 2/2] reworking fix for #332, broadening filter scope to exclude datePublished for any child dataset --- src/main/resources/application-context-schema-org.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/resources/application-context-schema-org.xml b/src/main/resources/application-context-schema-org.xml index 01195265..b2bbccbd 100644 --- a/src/main/resources/application-context-schema-org.xml +++ b/src/main/resources/application-context-schema-org.xml @@ -181,9 +181,11 @@ WHERE { ?datasetId rdf:type SO:Dataset . ?datasetId SO:datePublished ?datePublished - # Don't include referenced sub-Datasets (i.e. a Dataset in a 'hasPart' property) - FILTER NOT EXISTS { ?id SO:hasPart ?datasetId . } - FILTER NOT EXISTS { ?id SO:workExample ?datasetId . } + # Filter out any dataset that is a child of another dataset + FILTER NOT EXISTS { + ?parentDataset rdf:type SO:Dataset . + ?parentDataset ?p ?datasetId . + } } ]]>