Skip to content

Queries

Achraf Atauil edited this page Aug 30, 2022 · 12 revisions

Queries

This page helps to document often used queries.

Export queries

bestuurseenheid & bestuursorganen by classification UUID

PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>


CONSTRUCT {
   ?bestuurseenheid a besluit:Bestuurseenheid;
       mu:uuid ?bestuurseenheidUUID;
       besluit:classificatie ?classificatie;
       skos:prefLabel ?prefLabel;
       skos:altLabel ?altLabel;
       besluit:werkingsgebied ?werkingsgebied;
       ext:inProvincie ?provincie.
  
   ?classificatie a ext:BestuurseenheidClassificatieCode, skos:Concept;
       mu:uuid ?classificatieUUID;
       skos:prefLabel ?classificatieLabel;
       skos:topConceptOf ?topConcept;
       skos:inScheme ?inScheme.
  
   ?werkingsgebied a prov:Location;
       mu:uuid ?werkingsgebiedUUID;
       rdfs:label ?werkingsgebiedLabel;
       ext:werkingsgebiedNiveau ?werkingsgebiedNiveau.
      
   ?provincie a prov:Location;
      mu:uuid ?provincieUUID;
      rdfs:label ?provincieLabel;
      ext:werkingsgebiedNiveau ?provincieNiveau.
  
   ?bestuursorgaan besluit:bestuurt ?bestuurseenheid.
  
   ?bestuursorgaan a besluit:Bestuursorgaan;
      mu:uuid ?bestuursorgaanUUID;
      skos:prefLabel ?bestuursorgaanLabel;
      mandaat:bindingEinde ?mandaatEinde;
      mandaat:bindingStart ?mandaatStart;
      besluit:classificatie ?bestuursorgaanClassificatie.

  
  } WHERE {
    VALUES ?classificatieUUID {
      "5ab0e9b8a3b2ca7c5e000000" #provincie
      "5ab0e9b8a3b2ca7c5e000001" #gemeente
      "66ec74fd-8cfc-4e16-99c6-350b35012e86" #bestuur-eredienst
      "f9cac08a-13c1-49da-9bcb-f650b0604054" #centraal-bestuur-van-de-eredienst
    }
      
    ?classificatie mu:uuid ?classificatieUUID;
       skos:prefLabel ?classificatieLabel;
       skos:topConceptOf ?topConcept;
       skos:inScheme ?inScheme.

    ?bestuurseenheid a besluit:Bestuurseenheid;
       mu:uuid ?bestuurseenheidUUID;
       besluit:classificatie ?classificatie;
       mu:uuid ?uuid;
       skos:prefLabel ?prefLabel.

    OPTIONAL {
      ?bestuurseenheid skos:altLabel ?altLabel.
    }
  
    OPTIONAL {
       ?bestuurseenheid besluit:werkingsgebied ?werkingsgebied.
       ?werkingsgebied mu:uuid ?werkingsgebiedUUID.

       OPTIONAL {
         ?werkingsgebied rdfs:label ?werkingsgebiedLabel.
       }
       OPTIONAL {
         ?werkingsgebied ext:werkingsgebiedNiveau ?werkingsgebiedNiveau.
       }                       
    }
  
    OPTIONAL {
       ?bestuurseenheid ext:inProvincie ?provincie.
       ?provincie mu:uuid ?provincieUUID.
    
       OPTIONAL {
         ?provincie rdfs:label ?provincieLabel.
       }
       OPTIONAL {
         ?provincie ext:werkingsgebiedNiveau ?provincieNiveau.
       }   
    }
    
    OPTIONAL {
      ?bestuursorgaan a besluit:Bestuursorgaan;
         besluit:bestuurt ?bestuurseenheid;
         mu:uuid ?bestuursorgaanUUID;
         skos:prefLabel ?bestuursorgaanLabel;
         besluit:classificatie ?bestuursorgaanClassificatie.

      OPTIONAL {
        ?bestuursorgaan mandaat:bindingEinde ?mandaatEinde.
      }
    
      OPTIONAL {
        ?bestuursorgaan mandaat:bindingStart ?mandaatStart.
      }
    }
  
}

Bestuursorgaan in tijd by classification UUID

PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>


CONSTRUCT {  
   ?bestuursorgaan mandaat:isTijdspecialisatieVan ?bot.
  
   ?bot a besluit:Bestuursorgaan;
      mu:uuid ?botUUID;
      skos:prefLabel ?botLabel;
      mandaat:bindingEinde ?mandaatEinde;
      mandaat:bindingStart ?mandaatStart;
      besluit:classificatie ?botClassificatie.

  
  } WHERE {
    VALUES ?classificatieUUID {
      "5ab0e9b8a3b2ca7c5e000000" #provincie
      "5ab0e9b8a3b2ca7c5e000001" #gemeente
      "66ec74fd-8cfc-4e16-99c6-350b35012e86" #bestuur-eredienst
    }
      
    ?classificatie mu:uuid ?classificatieUUID.

    ?bestuurseenheid besluit:classificatie ?classificatie.
    ?bestuursorgaan mandaat:isTijdspecialisatieVan ?bot.


    OPTIONAL {
      ?bot a besluit:Bestuursorgaan;
         besluit:bestuurt ?bestuurseenheid;
         mu:uuid ?botUUID;
         skos:prefLabel ?botLabel;
         besluit:classificatie ?botClassificatie.

      OPTIONAL {
        ?bot mandaat:bindingEinde ?mandaatEinde.
      }
    
      OPTIONAL {
        ?bot mandaat:bindingStart ?mandaatStart.
      }
    }
  
} LIMIT 50000

besluitTypes by typeUUID

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX lblodBesluit: <http://lblod.data.gift/vocabularies/besluit/>

CONSTRUCT {
  ?type a skos:Concept;
      mu:uuid ?typeUUID;
      skos:prefLabel ?typeLabel;
      lblodBesluit:decidableBy ?decidableBy;
      skos:topConcept ?topConcept;
      skos:inScheme ?scheme.
  
  ?topConcept a skos:ConceptScheme;	
    mu:uuid ?topConceptUUID;
    skos:prefLabel ?topConceptPrefLabel;
    skos:definition ?definitie.
  
  ?scheme a skos:ConceptScheme;	
    mu:uuid ?schemeUUID;
    skos:prefLabel ?schemePrefLabel;
    skos:definition ?schemeDefinitie.

} WHERE {
    VALUES ?typeUUID {
      "8e791b27-7600-4577-b24e-c7c29e0eb773" #Notulen
      "b25faa84-3ab5-47ae-98c0-1b389c77b827" #Schorsing beslissing eredienstbesturen
      "e44c535d-4339-4d15-bdbf-d4be6046de2c" #jaarrekening
      "672bf096-dccd-40af-ab60-bd7de15cc461" #Jaarrekeningen van de besturen van de eredienst
      "79414af4-4f57-4ca3-aaa4-f8f1e015e71c" #Advies bij jaarrekening eredienstbestuur
      "54b61cbd-349f-41c4-9c8a-7e8e67d08347" #Eindrekening
      "40831a2c-771d-4b41-9720-0399998f1873" #Budget
      "18833df2-8c9e-4edd-87fd-b5c252337349" #Budgetten(wijzigingen) van besturen van de eredienst
      "df261490-cc74-4f80-b783-41c35e720b46" #Besluit over budget(wijziging) eredienstbestuur
      "2c9ada23-1229-4c7e-a53e-acddc9014e4e" #Meerjarenplannen(wijzigingen) van de besturen van de eredienst
      "f56c645d-b8e1-4066-813d-e213f5bc529f" #Meerjarenplan(aanpassing)
      "3fcf7dba-2e5b-4955-a489-6dd8285c013b" #Besluit over meerjarenplan(aanpassing) eredienstbestuur
    }
  
   	?type a skos:Concept;
      mu:uuid ?typeUUID;
      skos:prefLabel ?typeLabel;
      lblodBesluit:decidableBy ?decidableBy;
      skos:topConceptOf ?topConcept;
      skos:inScheme ?scheme.
  
    ?topConcept a skos:ConceptScheme;	
      mu:uuid ?topConceptUUID;
      skos:prefLabel ?topConceptPrefLabel;
      skos:definition ?definitie.
  
    ?scheme a skos:ConceptScheme;	
      mu:uuid ?schemeUUID;
      skos:prefLabel ?schemePrefLabel;
      skos:definition ?schemeDefinitie.
}