diff --git a/config/migrations/2022212411511111121112333222-private-data.sparql b/config/migrations/2022212411511111121112333222-private-data.sparql new file mode 100644 index 0000000..6a2e496 --- /dev/null +++ b/config/migrations/2022212411511111121112333222-private-data.sparql @@ -0,0 +1,53 @@ + PREFIX ext: + PREFIX xsd: + PREFIX mu: + PREFIX generiek: + PREFIX persoon: + PREFIX person: + + DELETE { + GRAPH { + ?s persoon:heeftGeboorte ?heeftGeboorte . + ?s persoon:registratie ?registration . + ?registration generiek:gestructureerdeIdentificator ?identificator . + ?identificator ?x ?y . + ?registration ?t ?j . + ?s persoon:geslacht ?geslacht . + ?s persoon:heeftNationaliteit ?nationaliteit . + } + } + INSERT { + GRAPH { + ?s persoon:heeftGeboorte ?heeftGeboorte . + ?s persoon:registratie ?registration . + ?registration generiek:gestructureerdeIdentificator ?identificator . + ?identificator ?x ?y . + ?registration ?t ?j . + ?s persoon:geslacht ?geslacht . + ?s persoon:heeftNationaliteit ?nationaliteit . + } + } + WHERE + { GRAPH + { + ?s a person:Person. + OPTIONAL + { ?s persoon:heeftGeboorte ?heeftGeboorte . + ?heeftGeboorte + ?p ?o + } + OPTIONAL + { ?s persoon:registratie ?registration . + ?registration + generiek:gestructureerdeIdentificator ?identificator . + ?identificator + ?x ?y . + ?registration + ?t ?j + } + OPTIONAL + { ?s persoon:geslacht ?geslacht } + OPTIONAL + { ?s persoon:heeftNationaliteit ?nationaliteit } + } + }