forgot to save

This commit is contained in:
Nordine Bittich
2022-07-20 09:50:35 +02:00
parent 5ab723a883
commit 44665ca2ac

View File

@@ -20,71 +20,50 @@ PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX code: <http://lblod.data.gift/vocabularies/organisatie/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
SELECT DISTINCT ?bestuur ?label ?typeEredienst ?provincie ?municipality ?betrokkenheid WHERE {
{
SELECT ?bestuur ?betrokkenheid (COUNT(DISTINCT ?betrokkenheid) as ?betrokkenheidCount) WHERE {
?bestuur
a
?type.
FILTER (?type IN (
<http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst>,
<http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst>
))
?betrokkenheid
org:organization
?bestuur;
ere:typebetrokkenheid <http://lblod.data.gift/concepts/ac400cc9f135ac7873fb3e551ec738c1>;
a
ere:BetrokkenLokaleBesturen.
}
GROUP BY ?bestuur ?betrokkenheid
HAVING(COUNT(DISTINCT ?betrokkenheid) > 1)
ORDER BY DESC(?betrokkenheidCount)
}
OPTIONAL {
?bestuur
skos:prefLabel
?label
}
OPTIONAL {
?bestuur
ere:typeEredienst
?typeEredienstUri.
OPTIONAL {
?typeEredienstUri
skos:prefLabel
?typeEredienst.
}
}
OPTIONAL {
?bestuur
org:hasPrimarySite
?primarySite.
OPTIONAL {
?primarySite
organisatie:bestaatUit
?sa.
OPTIONAL {
?sa
locn:adminUnitL2
?provincie.
DELETE { GRAPH <http://mu.semte.ch/graphs/organisatieportaal> { ?betrokkenheid ere:typebetrokkenheid <http://lblod.data.gift/concepts/ac400cc9f135ac7873fb3e551ec738c1>. } }
INSERT { GRAPH <http://mu.semte.ch/graphs/organisatieportaal> { ?betrokkenheid ere:typebetrokkenheid <http://lblod.data.gift/concepts/86fcbbbff764f1cba4c7e10dbbae578e>. } }
WHERE {
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
{
SELECT DISTINCT ?bestuur ?label ?typeEredienst ?provincie ?municipality ?betrokkenheidCount WHERE {
{
SELECT ?bestuur (COUNT(DISTINCT ?betrokkenheid) AS ?betrokkenheidCount) WHERE {
?bestuur rdf:type ?type.
FILTER(?type IN(ere:CentraalBestuurVanDeEredienst, ere:BestuurVanDeEredienst))
?betrokkenheid org:organization ?bestuur;
ere:typebetrokkenheid <http://lblod.data.gift/concepts/ac400cc9f135ac7873fb3e551ec738c1>;
rdf:type ere:BetrokkenLokaleBesturen.
}
GROUP BY ?bestuur
HAVING ((COUNT(DISTINCT ?betrokkenheid)) > 1 )
ORDER BY DESC (?betrokkenheidCount)
}
OPTIONAL {
?sa
adres:gemeentenaam
?municipality.
OPTIONAL { ?bestuur skos:prefLabel ?label. }
OPTIONAL {
?bestuur ere:typeEredienst ?typeEredienstUri.
OPTIONAL { ?typeEredienstUri skos:prefLabel ?typeEredienst. }
}
OPTIONAL {
?bestuur org:hasPrimarySite ?primarySite.
OPTIONAL {
?primarySite organisatie:bestaatUit ?sa.
OPTIONAL { ?sa locn:adminUnitL2 ?provincie. }
OPTIONAL { ?sa adres:gemeentenaam ?municipality. }
}
}
}
}
}
?betrokkenheid org:organization ?bestuur;
ere:typebetrokkenheid <http://lblod.data.gift/concepts/ac400cc9f135ac7873fb3e551ec738c1>;
rdf:type ere:BetrokkenLokaleBesturen.
?administrativeUnit ere:betrokkenBestuur ?betrokkenheid.
OPTIONAL { ?administrativeUnit skos:prefLabel ?administrativeUnitLabel. }
FILTER(?administrativeUnitLabel != ?municipality)
}
}