cleanup data: delete primary type when it's secondary (#166)

This commit is contained in:
Nordine Bittich
2022-09-05 12:09:46 +02:00
committed by GitHub
parent 4e2c61fe89
commit 787bc9e9c7

View File

@@ -0,0 +1,24 @@
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
?secondary
schema:contactType "Primary"
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
?primary
a schema:ContactPoint;
locn:address ?a1;
schema:telephone ?t1.
?mandataris schema:contactPoint ?primary, ?secondary.
?secondary
schema:telephone ?t2.
FILTER NOT EXISTS {
?secondary locn:address ?a2.
}
}
}