diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/delete_ADS_getty_enrichment_for_collection.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/delete_ADS_getty_enrichment_for_collection.sparql new file mode 100644 index 0000000..9ae645f --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/delete_ADS_getty_enrichment_for_collection.sparql @@ -0,0 +1,44 @@ +#First count how many triples are there +PREFIX aocat: +PREFIX ariadneplus: +PREFIX skos: +SELECT ?resource ?aat WHERE { + + GRAPH { + ?resource ?p ?o . +} + GRAPH { + ?resource aocat:has_derived_subject ?aat . + } +} + +#let's delete them from the aatplus graph for the individual records + +PREFIX aocat: +PREFIX rdf: +WITH +DELETE { + ?resource aocat:has_derived_subject ?aat . +} +USING +USING +WHERE { + ?resource rdf:type aocat:AO_Individual_Data_Resource . + ?resource aocat:has_derived_subject ?aat . +} + +#and now the collection + +PREFIX aocat: +PREFIX rdf: +WITH +DELETE { + ?resource aocat:has_derived_subject ?aat . +} +USING +USING +WHERE { + + ?resource rdf:type aocat:AO_Collection . + ?resource aocat:has_derived_subject ?aat . +} diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/delete_ADS_periodo_enrichment_for_collection.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/delete_ADS_periodo_enrichment_for_collection.sparql new file mode 100644 index 0000000..cb01190 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/delete_ADS_periodo_enrichment_for_collection.sparql @@ -0,0 +1,34 @@ +#First count how many triples are there +PREFIX aocat: +PREFIX ariadneplus: +SELECT * WHERE { + + GRAPH { + ?resource aocat:has_temporal_coverage ?temporal . +} + GRAPH { + ?temporal aocat:has_period ?period . + optional {?temporal aocat:from ?temporalFrom .} + optional {?temporal aocat:until ?temporalUntil .} + + } + +} + +#let's delete them from the periodoplus graph + +PREFIX aocat: +WITH +DELETE { + ?temporal aocat:has_period ?periodOURI . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . +} +USING +USING +WHERE { + ?resource aocat:has_temporal_coverage ?temporal . + ?temporal aocat:has_period ?periodOURI . + optional {?temporal aocat:from ?temporalFrom .} + optional {?temporal aocat:until ?temporalUntil .} +}