34 lines
1.2 KiB
SPARQL
34 lines
1.2 KiB
SPARQL
PREFIX org: <http://www.w3.org/ns/org#>
|
|
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
|
|
|
DELETE {
|
|
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
|
?duplicateMembership ?p ?o .
|
|
}
|
|
} WHERE {
|
|
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
|
?duplicateMembership a org:Membership ;
|
|
org:organization ?ocmw ;
|
|
org:member ?municipality ;
|
|
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> ;
|
|
?p ?o .
|
|
|
|
# Find the other memberships with swapped organizations
|
|
?correctMembership a org:Membership ;
|
|
org:organization ?municipality ;
|
|
org:member ?ocmw ;
|
|
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
|
|
}
|
|
|
|
GRAPH <http://mu.semte.ch/graphs/shared> {
|
|
?municipality org:classification ?municipalityClassification .
|
|
}
|
|
|
|
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
|
?ocmw org:classification ?ocmwClassification .
|
|
}
|
|
|
|
FILTER(?municipalityClassification = <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>)
|
|
FILTER(?ocmwClassification = <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>)
|
|
}
|