diff --git a/packages/network-of-terms-catalog/catalog/datasets/muziekschatten-klassieke-werken.jsonld b/packages/network-of-terms-catalog/catalog/datasets/muziekschatten-klassieke-werken.jsonld new file mode 100644 index 000000000..5ee8e6c79 --- /dev/null +++ b/packages/network-of-terms-catalog/catalog/datasets/muziekschatten-klassieke-werken.jsonld @@ -0,0 +1,63 @@ +{ + "@context": "https://schema.org/docs/jsonldcontext.jsonld", + "@id": "https://data.muziekschatten.nl/som/Klassiekewerken", + "@type": "Dataset", + "name": [ + { + "@language": "nl", + "@value": "Muziekschatten: klassieke muziekwerken" + } + ], + "genre": [ + { + "@id": "https://data.cultureelerfgoed.nl/termennetwerk/onderwerpen/Objecten" + } + ], + "creator": [ + { + "@id": "https://www.podiumkunst.net" + } + ], + "url": [ + "https://data.muziekschatten.nl/som/work/" + ], + "mainEntityOfPage": [ + "https://data.muziekschatten.nl/som/" + ], + "description": [ + { + "@language": "nl", + "@value": "Termen voor het beschrijven van (Nederlandse) klassieke muziekwerken" + } + ], + "inLanguage": "nl", + "distribution": [ + { + "@id": "https://data.muziekschatten.nl/sparql/#klassiekewerken", + "@type": "DataDownload", + "contentUrl": "https://data.muziekschatten.nl/sparql", + "encodingFormat": "application/sparql-query", + "potentialAction": [ + { + "@type": "SearchAction", + "query": "file://catalog/queries/search/muziekschatten-klassiekewerken.rq" + }, + { + "@type": "FindAction", + "query": "file://catalog/queries/lookup/muziekschatten.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/queries/lookup/muziekschatten.rq b/packages/network-of-terms-catalog/catalog/queries/lookup/muziekschatten.rq index 4c6d6ec6b..56f235993 100644 --- a/packages/network-of-terms-catalog/catalog/queries/lookup/muziekschatten.rq +++ b/packages/network-of-terms-catalog/catalog/queries/lookup/muziekschatten.rq @@ -1,4 +1,5 @@ PREFIX owl: +PREFIX rdaw: PREFIX schema: PREFIX skos: PREFIX som: @@ -11,9 +12,11 @@ CONSTRUCT { skos:scopeNote ?scopeNote ; skos:scopeNote ?schema_hasOccupation ; skos:broader ?broader_uri ; + skos:narrower ?narrower_uri ; skos:exactMatch ?exactMatch_uri ; skos:inScheme ?datasetUri . ?broader_uri skos:prefLabel ?broader_prefLabel . + ?narrower_uri skos:prefLabel ?narrower_prefLabel . } WHERE { # For example: @@ -22,10 +25,15 @@ WHERE { # Person: # Person: # Uitvoeringsmedium: + # Klassiek muziekwerk: VALUES ?uri { ?uris } ?uri a ?type . - VALUES ?type { skos:Concept schema:Person } . + VALUES ?type { + skos:Concept + schema:Person + # Klassiek muziekwerk + } . # For Uitvoeringsmedia OPTIONAL { @@ -117,5 +125,34 @@ WHERE { BIND(CONCAT(?name, IF(?dates != "", CONCAT(" (", ?dates, ")"), "")) AS ?prefLabel) OPTIONAL { ?uri owl:sameAs ?exactMatch_uri } # Has no labels. } + + # For Klassieke muziekwerken + OPTIONAL { + ?uri a ; + rdfs:label ?prefLabel . + + OPTIONAL { ?uri rdaw:P10086 ?altLabel } # Varianttitel + OPTIONAL { ?uri rdaw:P10219 ?eerste_datum } + OPTIONAL { ?uri rdaw:P10333 ?opusnummer } + OPTIONAL { ?uri rdaw:P10335 ?thematisch_nummer } + OPTIONAL { + ?uri rdaw:P10019 ?broader_uri . # Is part of work + ?broader_uri rdfs:label ?broader_prefLabel . + } + OPTIONAL { + ?uri rdaw:P10147 ?narrower_uri . # Has part work + ?narrower_uri rdfs:label ?narrower_prefLabel . + } + + BIND( + CONCAT( + ?prefLabel, ",", + IF(BOUND(?altLabel), CONCAT(" Varianttitel: ", ?altLabel, ","), ""), + IF(BOUND(?opusnummer), CONCAT(" Opusnr.: ", ?opusnummer, ","), ""), + IF(BOUND(?thematisch_nummer), CONCAT(" Thematisch nr.: ", ?thematisch_nummer, ","), ""), + IF(BOUND(?eerste_datum), CONCAT(" Datum: ", ?eerste_datum), "") + ) AS ?scopeNote + ) + } } LIMIT 1000 diff --git a/packages/network-of-terms-catalog/catalog/queries/search/muziekschatten-klassiekewerken.rq b/packages/network-of-terms-catalog/catalog/queries/search/muziekschatten-klassiekewerken.rq new file mode 100644 index 000000000..dd6bcba94 --- /dev/null +++ b/packages/network-of-terms-catalog/catalog/queries/search/muziekschatten-klassiekewerken.rq @@ -0,0 +1,50 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX rdaw: +PREFIX skos: +PREFIX schema: +PREFIX som: + +CONSTRUCT { + ?uri a skos:Concept; + skos:prefLabel ?prefLabel ; + skos:altLabel ?altLabel ; + skos:scopeNote ?scopeNote ; + skos:broader ?broader_uri ; + skos:narrower ?narrower_uri . + ?broader_uri skos:prefLabel ?broader_prefLabel . + ?narrower_uri skos:prefLabel ?narrower_prefLabel . +} +WHERE { + ?uri ?predicate ?label. + VALUES ?predicate { rdfs:label rdaw:P10086 rdaw:P10223 rdaw:P10333 rdaw:P10335 rdaw:P10047 } + + FILTER(CONTAINS(LCASE(?label), LCASE(?query))) + + ?uri a ; + rdfs:label ?prefLabel . + + OPTIONAL { ?uri rdaw:P10086 ?altLabel } # Varianttitel + OPTIONAL { ?uri rdaw:P10219 ?eerste_datum } + OPTIONAL { ?uri rdaw:P10333 ?opusnummer } + OPTIONAL { ?uri rdaw:P10335 ?thematisch_nummer } + OPTIONAL { + ?uri rdaw:P10019 ?broader_uri . # Is part of work + ?broader_uri rdfs:label ?broader_prefLabel . + } + OPTIONAL { + ?uri rdaw:P10147 ?narrower_uri . # Has part work + ?narrower_uri rdfs:label ?narrower_prefLabel . + } + + BIND( + CONCAT( + ?prefLabel, ",", + IF(BOUND(?altLabel), CONCAT(" Varianttitel: ", ?altLabel, ","), ""), + IF(BOUND(?opusnummer), CONCAT(" Opusnr.: ", ?opusnummer, ","), ""), + IF(BOUND(?thematisch_nummer), CONCAT(" Thematisch nr.: ", ?thematisch_nummer, ","), ""), + IF(BOUND(?eerste_datum), CONCAT(" Datum: ", ?eerste_datum), "") + ) AS ?scopeNote + ) +} +LIMIT 1000