From c373a3708b7e50cb311149c92feb2fc9adb57411 Mon Sep 17 00:00:00 2001 From: mirdono Date: Wed, 21 Aug 2024 15:49:55 +0200 Subject: [PATCH] feat: migration to import actual VGC The Vlaamse Gemeenschapscommissie is a special kind of administrative unit, with its own specific classification code (which was added in a previous commit). The core data, address, and contact information was provided by the business. Note: currently the province in the address is intentionally left empty. This data will be provided (or entered) later by business. --- ...-gemeenschapscommissie-organisation.sparql | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 config/migrations/2024/20240814145303-add-vlaamse-gemeenschapscommissie/20240821134726-add-vlaamse-gemeenschapscommissie-organisation.sparql diff --git a/config/migrations/2024/20240814145303-add-vlaamse-gemeenschapscommissie/20240821134726-add-vlaamse-gemeenschapscommissie-organisation.sparql b/config/migrations/2024/20240814145303-add-vlaamse-gemeenschapscommissie/20240821134726-add-vlaamse-gemeenschapscommissie-organisation.sparql new file mode 100644 index 0000000..276f6e6 --- /dev/null +++ b/config/migrations/2024/20240814145303-add-vlaamse-gemeenschapscommissie/20240821134726-add-vlaamse-gemeenschapscommissie-organisation.sparql @@ -0,0 +1,129 @@ +PREFIX mu: +PREFIX skos: +PREFIX org: +PREFIX regorg: +PREFIX adms: +PREFIX generiek: +PREFIX org: +PREFIX organisatie: +PREFIX ere: +PREFIX adres: +PREFIX locn: +PREFIX foaf: +PREFIX schema: + +INSERT { + GRAPH { + ?vgcUri a , + , + . + + ?vgcUri mu:uuid ?vgcUuid ; + skos:prefLabel """Vlaamse Gemeenschapscommissie""" ; + regorg:legalName """Vlaamse Gemeenschapscommissie""" ; + skos:altLabel """VGC""" ; + skos:altLabel """Commission communautaire flamande""" ; + org:classification . # Vlaamse gemeenschapscommissie + } + + GRAPH { + ?vgcUri regorg:orgStatus . # Actief + + # KBO number + ?vgcUri adms:identifier ?kboIdUri . + ?kboIdUri a adms:Identifier ; + mu:uuid ?kboIdUuid ; + skos:notation "KBO nummer" ; + generiek:gestructureerdeIdentificator ?kboStructUri . + ?kboStructUri a generiek:GestructureerdeIdentificator ; + mu:uuid ?kboStructUuid ; + generiek:lokaleIdentificator """0240682635""" . + + # Placeholder OVO number + ?vgcUri adms:identifier ?ovoIdUri . + ?ovoIdUri a adms:Identifier ; + mu:uuid ?ovoIdUuid ; + skos:notation "OVO-nummer" ; + generiek:gestructureerdeIdentificator ?ovoStructUri . + ?ovoStructUri a generiek:GestructureerdeIdentificator ; + mu:uuid ?ovoStructUuid . + + # Placeholder for SharePoint identifier + ?vgcUri adms:identifier ?sharepointIdUri . + ?sharepointIdUri a adms:Identifier ; + mu:uuid ?sharepointIdUuid ; + skos:notation "SharePoint identificator" ; + generiek:gestructureerdeIdentificator ?sharepointStructUri . + ?sharepointStructUri a generiek:GestructureerdeIdentificator ; + mu:uuid ?sharepointStructUuid . + + # Primary Site + ?vgcUri org:hasPrimarySite ?primarySiteUri . + ?primarySiteUri a org:Site ; + mu:uuid ?primarySiteUuid ; + organisatie:bestaatUit ?addressUri ; + org:siteAddress ?primaryContactPointUri ; + org:siteAddress ?secondaryContactPointUri ; + ere:vestigingstype . # Maatschappelijke zetel + + ## Address + ?addressUri a locn:Address ; + mu:uuid ?addressUuid ; + adres:Adresvoorstelling.huisnummer "135" ; + locn:thoroughfare "Emile Jacqmainlaan" ; + locn:postCode "1000" ; + adres:gemeentenaam "Brussel" ; + adres:land """Belgiƫ""" ; + locn:fullAddress """Emile Jacqmainlaan 135, 1000 Brussel, Belgiƫ""" . + + ## Primary contact point + ?primaryContactPointUri a schema:ContactPoint ; + mu:uuid ?primaryContactPointUuid ; + schema:telephone "tel:+3225630300" ; + schema:email "info@vgc.be" ; + foaf:page "https://www.vgc.be" ; + schema:contactType "Primary" . + + ## Secondary contact point + ?secondaryContactPointUri a schema:ContactPoint ; + mu:uuid ?secondaryContactPointUuid ; + schema:contactType "Secondary" . + } +} WHERE { + BIND("9e6b6eb3-2f0b-4723-876b-178dfaecfddf" AS ?vgcUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/bestuurseenheden/", STR(?vgcUuid))) AS ?vgcUri) + + # UUID and URI for KBO number + BIND(SHA256(CONCAT(STR(?vgcUuid), "KBO number identifier")) AS ?kboIdUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/identificatoren/", STR(?kboIdUuid))) AS ?kboIdUri) + BIND(SHA256(CONCAT(STR(?vgcUuid), STR(?kboUuid), "KBO number structured identifier")) AS ?kboStructUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/gestructureerdeIdentificatoren/", STR(?kboStructUuid))) AS ?kboStructUri) + + # UUID and URI for OVO number + BIND(SHA256(CONCAT(STR(?vgcUuid), "OVO number identifier")) AS ?ovoIdUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/identificatoren/", STR(?ovoIdUuid))) AS ?ovoIdUri) + BIND(SHA256(CONCAT(STR(?vgcUuid), STR(?ovoUuid), "OVO number structured identifier")) AS ?ovoStructUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/gestructureerdeIdentificatoren/", STR(?ovoStructUuid))) AS ?ovoStructUri) + + # UUID and URI for SharePoint number + BIND(SHA256(CONCAT(STR(?vgcUuid), "SharePoint number identifier")) AS ?sharepointIdUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/identificatoren/", STR(?sharepointIdUuid))) AS ?sharepointIdUri) + BIND(SHA256(CONCAT(STR(?vgcUuid), STR(?sharepointUuid), "SharePoint structured number identifier")) AS ?sharepointStructUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/gestructureerdeIdentificatoren/", STR(?sharepointStructUuid))) AS ?sharepointStructUri) + + # Primary site + BIND(SHA256(CONCAT(STR(?vgcUuid), "VGC primary site")) AS ?primarySiteUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/vestigingen/", STR(?primarySiteUuid))) AS ?primarySiteUri) + + ## Address + BIND(SHA256(CONCAT(STR(?vgcUuid), STR(?primarySiteUuid), "VGC primary site address")) AS ?addressUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/adressen/", STR(?addressUuid))) AS ?addressUri) + + ## Primary contact point + BIND(SHA256(CONCAT(STR(?vgcUuid), STR(?primarySiteUuid), "VGC primary site primary contact point")) AS ?primaryContactPointUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/contact-punten/", STR(?primaryContactPointUuid))) AS ?primaryContactPointUri) + + ## Secondary contact point + BIND(SHA256(CONCAT(STR(?vgcUuid), STR(?primarySiteUuid), "VGC primary site secondary contact point")) AS ?secondaryContactPointUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/contact-punten/", STR(?secondaryContactPointUuid))) AS ?secondaryContactPointUri) +}