From c6118ab11977c026b7e914607fb6710948c9f775 Mon Sep 17 00:00:00 2001 From: Leon van Wissen Date: Wed, 3 Apr 2024 13:41:49 +0200 Subject: [PATCH] feat: Update and add Adamlink sources (#1296) * feat: ATM as publisher * feat: update streets to new endpoint * feat: add addresses * chore: Remove unused publisher * chore: Fix casing --------- Co-authored-by: David de Boer --- .../catalog/datasets/adamlink-adressen.jsonld | 58 +++++++++++++++++++ .../catalog/datasets/adamlink-straten.jsonld | 8 +-- .../catalog/publishers.jsonld | 12 ++-- .../queries/lookup/adamlink-adressen.rq | 49 ++++++++++++++++ .../queries/lookup/adamlink-straten.rq | 23 ++++---- .../queries/search/adamlink-adressen.rq | 49 ++++++++++++++++ .../queries/search/adamlink-straten.rq | 27 +++++---- 7 files changed, 194 insertions(+), 32 deletions(-) create mode 100644 packages/network-of-terms-catalog/catalog/datasets/adamlink-adressen.jsonld create mode 100644 packages/network-of-terms-catalog/catalog/queries/lookup/adamlink-adressen.rq create mode 100644 packages/network-of-terms-catalog/catalog/queries/search/adamlink-adressen.rq diff --git a/packages/network-of-terms-catalog/catalog/datasets/adamlink-adressen.jsonld b/packages/network-of-terms-catalog/catalog/datasets/adamlink-adressen.jsonld new file mode 100644 index 000000000..b6a97aea3 --- /dev/null +++ b/packages/network-of-terms-catalog/catalog/datasets/adamlink-adressen.jsonld @@ -0,0 +1,58 @@ +{ + "@context": "https://schema.org/docs/jsonldcontext.jsonld", + "@id": "https://adamlink.nl/geo/addresses/start/", + "@type": "Dataset", + "name": [ + { + "@language": "nl", + "@value": "Adamlink: historische adressen in Amsterdam" + } + ], + "creator": [ + { + "@id": "https://www.amsterdamtimemachine.nl" + } + ], + "url": [ + "https://adamlink.nl/geo/address/" + ], + "mainEntityOfPage": [ + "https://adamlink.nl" + ], + "description": [ + { + "@language": "nl", + "@value": "Historische adressen in Amsterdam" + } + ], + "inLanguage": "nl", + "distribution": [ + { + "@id": "https://api.lod.uba.uva.nl/datasets/ATM/ATM-KG/services/ATM-KG/sparql#adamlink-addresses", + "@type": "DataDownload", + "contentUrl": "https://api.lod.uba.uva.nl/datasets/ATM/ATM-KG/services/ATM-KG/sparql", + "encodingFormat": "application/sparql-query", + "potentialAction": [ + { + "@type": "SearchAction", + "query": "file://catalog/queries/search/adamlink-adressen.rq" + }, + { + "@type": "FindAction", + "query": "file://catalog/queries/lookup/adamlink-adressen.rq" + }, + { + "@type": "Action", + "target": { + "@type": "EntryPoint", + "actionApplication": { + "@id": "https://reconciliation-api.github.io/specs/latest/", + "@type": "SoftwareApplication" + }, + "urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}" + } + } + ] + } + ] +} diff --git a/packages/network-of-terms-catalog/catalog/datasets/adamlink-straten.jsonld b/packages/network-of-terms-catalog/catalog/datasets/adamlink-straten.jsonld index e8aae6968..f8db2df35 100644 --- a/packages/network-of-terms-catalog/catalog/datasets/adamlink-straten.jsonld +++ b/packages/network-of-terms-catalog/catalog/datasets/adamlink-straten.jsonld @@ -10,7 +10,7 @@ ], "creator": [ { - "@id": "https://www.adamnet.nl" + "@id": "https://www.amsterdamtimemachine.nl" } ], "url": [ @@ -28,9 +28,9 @@ "inLanguage": "nl", "distribution": [ { - "@id": "https://druid.datalegend.net/AdamNet/Geography/sparql#streets", + "@id": "https://api.lod.uba.uva.nl/datasets/ATM/ATM-KG/services/ATM-KG/sparql#adamlink-streets", "@type": "DataDownload", - "contentUrl": "https://api.druid.datalegend.net/datasets/AdamNet/Geography/services/endpoint/sparql", + "contentUrl": "https://api.lod.uba.uva.nl/datasets/ATM/ATM-KG/services/ATM-KG/sparql", "encodingFormat": "application/sparql-query", "potentialAction": [ { @@ -55,4 +55,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/packages/network-of-terms-catalog/catalog/publishers.jsonld b/packages/network-of-terms-catalog/catalog/publishers.jsonld index a35031f64..303d89e8e 100644 --- a/packages/network-of-terms-catalog/catalog/publishers.jsonld +++ b/packages/network-of-terms-catalog/catalog/publishers.jsonld @@ -67,12 +67,6 @@ "name": "Bureau voor publicaties van de Europese Unie", "alternateName": "Europese Unie" }, - { - "@id": "https://www.adamnet.nl", - "@type": "Organization", - "name": "Stichting AdamNet", - "alternateName": "AdamNet" - }, { "@id": "https://www.erfgoedbrabant.nl", "@type": "Organization", @@ -108,6 +102,12 @@ "@type": "Organization", "name": "Podiumkunst.net", "alternateName": "Podiumkunst.net" + }, + { + "@id": "https://www.amsterdamtimemachine.nl", + "@type": "Organization", + "name": "Amsterdam Time Machine", + "alternateName": "ATM" } ] } diff --git a/packages/network-of-terms-catalog/catalog/queries/lookup/adamlink-adressen.rq b/packages/network-of-terms-catalog/catalog/queries/lookup/adamlink-adressen.rq new file mode 100644 index 000000000..a9ffb0435 --- /dev/null +++ b/packages/network-of-terms-catalog/catalog/queries/lookup/adamlink-adressen.rq @@ -0,0 +1,49 @@ +PREFIX hg: +PREFIX skos: +PREFIX owl: +PREFIX roar: +PREFIX schema: +PREFIX bag: +PREFIX rdfs: + +CONSTRUCT { + ?uri a skos:Concept ; + skos:prefLabel ?prefLabel ; + skos:altLabel ?altLabel ; + skos:scopeNote ?scopeNote ; + skos:exactMatch ?exactMatch_uri ; + rdfs:seeAlso ?seeAlso_uri . + + ?seeAlso_uri skos:prefLabel ?seeAlso_label . +} +WHERE { + # For example: + # Jodenbreestraat: + # Damrak: + + VALUES ?uri { ?uris } + + GRAPH { + ?uri a hg:Address . + + OPTIONAL { ?uri rdfs:label ?prefLabel } + OPTIONAL { ?uri skos:altLabel ?altLabel } + OPTIONAL { + ?uri roar:documentedIn ?source . + ?source rdfs:label ?source_name . + BIND(CONCAT("Adres afkomstig van ", ?source_name) AS ?scopeNote) + } + OPTIONAL { ?uri owl:sameAs ?exactMatch_uri } # Has no labels. + OPTIONAL { + ?exactMatch_uri a bag:Pand ; + schema:geoContains ?geo . + ?uri schema:geoContains ?geo . + } # A historical address is very similar to a bag:Pand + OPTIONAL { + ?uri schema:geoContains ?geo . + ?seeAlso_uri schema:geoContains ?geo ; + skos:altLabel ?seeAlso_label . + } + } +} +LIMIT 1000 diff --git a/packages/network-of-terms-catalog/catalog/queries/lookup/adamlink-straten.rq b/packages/network-of-terms-catalog/catalog/queries/lookup/adamlink-straten.rq index 66295656d..7f3eb53ec 100644 --- a/packages/network-of-terms-catalog/catalog/queries/lookup/adamlink-straten.rq +++ b/packages/network-of-terms-catalog/catalog/queries/lookup/adamlink-straten.rq @@ -1,6 +1,6 @@ PREFIX hg: PREFIX skos: -PREFIX void: +PREFIX owl: CONSTRUCT { ?uri a skos:Concept ; @@ -13,16 +13,19 @@ WHERE { # For example: # Jodenbreestraat: # Damrak: + VALUES ?uri { ?uris } - - ?uri a hg:Street . - - OPTIONAL { ?uri skos:prefLabel ?prefLabel } - OPTIONAL { ?uri skos:altLabel ?altLabel } - OPTIONAL { - ?uri hg:liesIn # Gemeente Amsterdam - BIND("Straat in Gemeente Amsterdam" AS ?scopeNote) + + GRAPH { + ?uri a hg:Street . + + OPTIONAL { ?uri skos:prefLabel ?prefLabel } + OPTIONAL { ?uri skos:altLabel ?altLabel } + OPTIONAL { + ?uri hg:liesIn # Gemeente Amsterdam + BIND("Straat in Gemeente Amsterdam" AS ?scopeNote) + } + OPTIONAL { ?uri owl:sameAs ?exactMatch_uri } # Has no labels. } - OPTIONAL { ?uri owl:sameAs ?exactMatch_uri } # Has no labels. } LIMIT 1000 diff --git a/packages/network-of-terms-catalog/catalog/queries/search/adamlink-adressen.rq b/packages/network-of-terms-catalog/catalog/queries/search/adamlink-adressen.rq new file mode 100644 index 000000000..719cf1949 --- /dev/null +++ b/packages/network-of-terms-catalog/catalog/queries/search/adamlink-adressen.rq @@ -0,0 +1,49 @@ +PREFIX hg: +PREFIX owl: +PREFIX bif: +PREFIX skos: +PREFIX roar: +PREFIX rdfs: +PREFIX bag: +PREFIX schema: + +CONSTRUCT { + ?uri a skos:Concept ; + skos:prefLabel ?prefLabel ; + skos:altLabel ?altLabel ; + skos:scopeNote ?scopeNote ; + skos:exactMatch ?exactMatch_uri ; + rdfs:seeAlso ?seeAlso_uri . + + ?seeAlso_uri skos:prefLabel ?seeAlso_label . +} +WHERE { + GRAPH { + ?uri a hg:Address . + ?uri ?predicate ?label . + + VALUES ?predicate { rdfs:label skos:prefLabel skos:altLabel } + + ?label ?virtuosoQuery . + + OPTIONAL { ?uri rdfs:label ?prefLabel } + OPTIONAL { ?uri skos:altLabel ?altLabel } + OPTIONAL { + ?uri roar:documentedIn ?source . + ?source rdfs:label ?source_name . + BIND(CONCAT("Adres afkomstig van ", ?source_name) AS ?scopeNote) + } + OPTIONAL { ?uri owl:sameAs ?exactMatch_uri } + OPTIONAL { + ?exactMatch_uri a bag:Pand ; + schema:geoContains ?geo . + ?uri schema:geoContains ?geo . + } # A historical address is very similar to a bag:Pand + OPTIONAL { + ?uri schema:geoContains ?geo . + ?seeAlso_uri schema:geoContains ?geo ; + skos:altLabel ?seeAlso_label . + } + } +} +LIMIT 1000 diff --git a/packages/network-of-terms-catalog/catalog/queries/search/adamlink-straten.rq b/packages/network-of-terms-catalog/catalog/queries/search/adamlink-straten.rq index c0c4baca5..3068c440f 100644 --- a/packages/network-of-terms-catalog/catalog/queries/search/adamlink-straten.rq +++ b/packages/network-of-terms-catalog/catalog/queries/search/adamlink-straten.rq @@ -1,7 +1,7 @@ PREFIX hg: PREFIX owl: +PREFIX bif: PREFIX skos: -PREFIX void: CONSTRUCT { ?uri a skos:Concept ; @@ -11,18 +11,21 @@ CONSTRUCT { skos:exactMatch ?exactMatch_uri . } WHERE { - ?uri void:inDataset . - ?uri a hg:Street . - ?uri ?predicate ?label . - VALUES ?predicate { skos:prefLabel skos:altLabel } - ?label ?virtuosoQuery . + GRAPH { + ?uri a hg:Street . + ?uri ?predicate ?label . - OPTIONAL { ?uri skos:prefLabel ?prefLabel } - OPTIONAL { ?uri skos:altLabel ?altLabel } - OPTIONAL { - ?uri hg:liesIn # Gemeente Amsterdam - BIND("Straat in Gemeente Amsterdam" AS ?scopeNote) + VALUES ?predicate { skos:prefLabel skos:altLabel } + + ?label ?virtuosoQuery . + + OPTIONAL { ?uri skos:prefLabel ?prefLabel } + OPTIONAL { ?uri skos:altLabel ?altLabel } + OPTIONAL { + ?uri hg:liesIn # Gemeente Amsterdam + BIND("Straat in Gemeente Amsterdam" AS ?scopeNote) + } + OPTIONAL { ?uri owl:sameAs ?exactMatch_uri } # Has no labels. } - OPTIONAL { ?uri owl:sameAs ?exactMatch_uri } # Has no labels. } LIMIT 1000