refactor: combined different queries in migration into one

This commit is contained in:
mirdono
2024-03-01 16:34:19 +01:00
committed by Alexander van den Berghe
parent 3cc305982a
commit 4e0a9170d9

View File

@@ -3,34 +3,18 @@ PREFIX regorg: <http://www.w3.org/ns/regorg#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org regorg:legalName ?name .
GRAPH ?g {
?org regorg:legalName ?legalName .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org a org:Organization ;
skos:prefLabel ?name .
}
}
;
INSERT {
GRAPH <http://mu.semte.ch/graphs/shared> {
?org regorg:legalName ?name .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/shared> {
?org a org:Organization ;
skos:prefLabel ?name .
}
}
;
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?org regorg:legalName ?name .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
GRAPH ?g {
?org a org:Organization ;
skos:prefLabel ?name .
}
VALUES ?g {
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/shared>
<http://mu.semte.ch/graphs/worship-service>
}
BIND(?name AS ?legalName)
}