-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add monumenten dataset description * add monumenten search query * add monumenten lookup query * Add required properties * Format queries * Remove GROUP BY * replace mainEntityOfPage replaced with https://monumentenregister.cultureelerfgoed.nl/ --------- Co-authored-by: David de Boer <[email protected]>
- Loading branch information
1 parent
e9ea826
commit 950a65a
Showing
3 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
packages/network-of-terms-catalog/catalog/datasets/rijksmonumenten.jsonld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"@context": "https://schema.org/docs/jsonldcontext.jsonld", | ||
"@id": "https://linkeddata.cultureelerfgoed.nl/cho-kennis/id/rijksmonument/", | ||
"@type": "Dataset", | ||
"name": [ | ||
{ | ||
"@language": "nl", | ||
"@value": "Rijksmonumenten" | ||
} | ||
], | ||
"alternateName": [ | ||
{ | ||
"@language": "nl", | ||
"@value": "Rijksmonumentenregister" | ||
} | ||
], | ||
"creator": [ | ||
{ | ||
"@id": "https://www.cultureelerfgoed.nl" | ||
} | ||
], | ||
"url": [ | ||
"https://linkeddata.cultureelerfgoed.nl/cho-kennis/id/rijksmonument/" | ||
], | ||
"mainEntityOfPage": [ | ||
"https://monumentenregister.cultureelerfgoed.nl/" | ||
], | ||
"description": [ | ||
{ | ||
"@language": "nl", | ||
"@value": "Rijksmonumenten" | ||
} | ||
], | ||
"inLanguage": "nl", | ||
"distribution": [ | ||
{ | ||
"@id": "https://linkeddata.cultureelerfgoed.nl/cho-kennis/id/rijksmonument/", | ||
"@type": "DataDownload", | ||
"contentUrl": "https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Rijksmonument/services/Rijksmonument/sparql", | ||
"encodingFormat": "application/sparql-query", | ||
"potentialAction": [ | ||
{ | ||
"@type": "SearchAction", | ||
"query": "file://catalog/queries/search/rijksmonumenten.rq" | ||
}, | ||
{ | ||
"@type": "FindAction", | ||
"query": "file://catalog/queries/lookup/rijksmonumenten.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}" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
47 changes: 47 additions & 0 deletions
47
packages/network-of-terms-catalog/catalog/queries/lookup/rijksmonumenten.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
PREFIX ceo: <https://linkeddata.cultureelerfgoed.nl/def/ceo/> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX ceosp: <https://linkeddata.cultureelerfgoed.nl/def/ceosp/> | ||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
CONSTRUCT { | ||
?uri a skos:Concept ; | ||
skos:prefLabel ?rijksmonumentnummer_tn ; | ||
skos:altLabel ?adres; | ||
skos:scopeNote ?scopeNote ; | ||
rdfs:seeAlso ?rdfs_seeAlso . | ||
} | ||
WHERE { | ||
VALUES ?uri { ?uris } | ||
?uri ceo:rijksmonumentnummer ?rijksmonumentnummer . | ||
OPTIONAL { ?uri ceosp:naam ?naam } | ||
OPTIONAL { ?uri ceosp:volledigAdres ?adres_zoeken } | ||
OPTIONAL { ?uri ceosp:postcode ?postcode1 } | ||
OPTIONAL { ?uri ceosp:heeftGemeente ?woonplaats } | ||
OPTIONAL { ?uri ceosp:oorspronkelijkeFunctie ?functie } | ||
OPTIONAL { ?uri ceosp:redengevendeOmschrijving ?redengevende_omschrijving } | ||
OPTIONAL { ?uri ceo:isOnderdeelVanComplex/ceo:heeftHoofdobject/ceo:rijksmonumentnummer ?rijksmonumentnummer_hoofdobject } | ||
|
||
BIND(URI(CONCAT("https://monumentenregister.cultureelerfgoed.nl/monumenten/", ?rijksmonumentnummer)) as ?rdfs_seeAlso) | ||
BIND(STRAFTER(STR(?woonplaats), "owms/terms/") AS ?owms_string) | ||
BIND(CONCAT("Rijksmonumentnummer ", ?rijksmonumentnummer) as ?rijksmonumentnummer_tn) | ||
BIND( | ||
CONCAT( | ||
IF(BOUND(?woonplaats), CONCAT(" ",?owms_string, ", "), ""), | ||
IF(BOUND(?functie), CONCAT("Oorspronkelijke functie: ", ?functie), ""), | ||
IF(BOUND(?naam), CONCAT(", Naam: ", ?naam), ""), | ||
IF(BOUND(?rijksmonumentnummer_hoofdobject) && ?rijksmonumentnummer != ?rijksmonumentnummer_hoofdobject, | ||
CONCAT(", Rijksmonumentnummer van hoofdobject: ", ?rijksmonumentnummer_hoofdobject), | ||
"" | ||
) | ||
) as ?scopeNote | ||
) | ||
{ | ||
SELECT ?uri (MIN(?optional_altlabel) AS ?adres) WHERE { | ||
?uri ceo:rijksmonumentnummer ?rijksmonumentnummer . | ||
OPTIONAL { ?uri ceosp:volledigAdres ?adres1 } | ||
BIND(IF(BOUND(?adres1), ?adres1, "Geen adres beschikbaar") AS ?optional_altlabel) | ||
} | ||
} | ||
} | ||
LIMIT 1000 |
49 changes: 49 additions & 0 deletions
49
packages/network-of-terms-catalog/catalog/queries/search/rijksmonumenten.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
PREFIX ceo: <https://linkeddata.cultureelerfgoed.nl/def/ceo/> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX ceosp: <https://linkeddata.cultureelerfgoed.nl/def/ceosp/> | ||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
CONSTRUCT { | ||
?monument_uri a skos:Concept ; | ||
skos:prefLabel ?rijksmonumentnummer_tn ; | ||
skos:altLabel ?adres ; | ||
skos:scopeNote ?scopeNote ; | ||
rdfs:seeAlso ?rdfs_seeAlso . | ||
} | ||
WHERE { | ||
?monument_uri ?predicate ?label . | ||
VALUES ?predicate { ceo:rijksmonumentnummer ceosp:naam ceosp:volledigAdres ceosp:postcode ceosp:woonplaatsnaam ceosp:redengevendeOmschrijving ceosp:heeftGemeente ceosp:oorspronkelijkeFunctie } | ||
|
||
?label <bif:contains> ?virtuosoQuery . | ||
|
||
?monument_uri ceo:rijksmonumentnummer ?rijksmonumentnummer . | ||
OPTIONAL { ?monument_uri ceosp:naam ?naam } | ||
OPTIONAL { ?monument_uri ceosp:heeftGemeente ?woonplaats } | ||
OPTIONAL { ?monument_uri ceosp:oorspronkelijkeFunctie ?functie } | ||
OPTIONAL { ?monument_uri ceosp:redengevendeOmschrijving ?redengevende_omschrijving } | ||
OPTIONAL { ?monument_uri ceo:isOnderdeelVanComplex/ceo:heeftHoofdobject/ceo:rijksmonumentnummer ?rijksmonumentnummer_hoofdobject } | ||
|
||
BIND(URI(CONCAT("https://monumentenregister.cultureelerfgoed.nl/monumenten/", ?rijksmonumentnummer)) as ?rdfs_seeAlso) | ||
BIND(STRAFTER(STR(?woonplaats), "owms/terms/") AS ?owms_string) | ||
BIND(CONCAT("Rijksmonumentnummer ", ?rijksmonumentnummer) as ?rijksmonumentnummer_tn) | ||
BIND( | ||
CONCAT( | ||
IF(BOUND(?woonplaats), CONCAT(" ",?owms_string, ", "), ""), | ||
IF(BOUND(?functie), CONCAT("Oorspronkelijke functie: ", ?functie), ""), | ||
IF(BOUND(?naam), CONCAT(", Naam: ", ?naam), ""), | ||
IF(BOUND(?rijksmonumentnummer_hoofdobject) && ?rijksmonumentnummer != ?rijksmonumentnummer_hoofdobject, | ||
CONCAT(", Rijksmonumentnummer van hoofdobject: ", ?rijksmonumentnummer_hoofdobject), | ||
"" | ||
) | ||
) as ?scopeNote | ||
) | ||
{ | ||
SELECT ?monument_uri (MIN(?optional_altlabel) AS ?adres) WHERE { | ||
?monument_uri ceo:rijksmonumentnummer ?rijksmonumentnummer . | ||
OPTIONAL { ?monument_uri ceosp:volledigAdres ?adres1 } | ||
BIND(IF(BOUND(?adres1), ?adres1, "Geen adres beschikbaar") AS ?optional_altlabel) | ||
} | ||
GROUP BY ?monument_uri | ||
} | ||
} |