diff --git a/LDV/Query-43.rq b/LDV/Query-43.rq index 769e217..714833b 100644 --- a/LDV/Query-43.rq +++ b/LDV/Query-43.rq @@ -1,41 +1,75 @@ #+ name: Query-43 -#+ description: Query die koppeling aangeeft tussen ABR en Archis data, specifiek de omschrijving vindplaats. -#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/patrick-mout/Archeologisch-Basis-Register/services/Archeologisch-Informatie-Systeem---thesa/sparql - -PREFIX skos: -PREFIX rdf: -PREFIX rdfs: -PREFIX ceo: - -SELECT ?vindplaats ?muntsoort ?locatieomschrijving - -WHERE { - skos:narrower ?artefactUri_facet1 . - ?artefactUri_facet1 skos:prefLabel ?artefact_facet1 . - - ?artefactUri_facet1 skos:narrower ?artefactUri_facet2 . - ?artefactUri_facet2 skos:prefLabel ?munttype . - - ?artefactUri_facet2 skos:narrower ?artefactUri_facet3 . - ?artefactUri_facet3 skos:prefLabel ?muntsoort . - - - BIND(IRI(REPLACE(STR(?artefactUri_facet2), "https://digitaalerfgoed-test.poolparty.biz/term/id/pre/rn/", "https://data.cultureelerfgoed.nl/term/id/rn/")) AS ?typeNaamUri_facet2) - BIND(IRI(REPLACE(STR(?artefactUri_facet3), "https://digitaalerfgoed-test.poolparty.biz/term/id/pre/rn/", "https://data.cultureelerfgoed.nl/term/id/rn/")) AS ?typeNaamUri_facet3) - - SERVICE { - { - ?vondst a ceo:Vondsten ; ceo:ligtInObject ?ligtInUri . ?ligtInUri ceo:heeftBasisregistratieRelatie/ceo:heeftBAGRelatie/ceo:woonplaatsnaam ?vindplaats ; - ceo:heeftOmschrijving/ceo:omschrijving ?locatieomschrijving . - ?vondst ceo:heeftType/ceo:heeftTypeNaam ?typeNaamUri_facet2 . - - } UNION { - ?vondst a ceo:Vondsten ; ceo:ligtInObject ?ligtInUri . ?ligtInUri ceo:heeftBasisregistratieRelatie/ceo:heeftBAGRelatie/ceo:woonplaatsnaam ?vindplaats ; - ceo:heeftOmschrijving/ceo:omschrijving ?locatieomschrijving . - ?vondst ceo:heeftType/ceo:heeftTypeNaam ?typeNaamUri_facet3 . - - } - } BIND(CONCAT("vondstlocatie:", STRAFTER(STR(?ligtInUri), "vondstlocatie/")) AS ?ligtIn) -} -GROUP BY ?vindplaats ?muntsoort ?locatieomschrijving -ORDER BY ?vindplaats \ No newline at end of file +#+ description: niet verwijderen. test voor archis mrs +#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Cultuurhistorische-Thesaurus-CHT/sparql + +prefix skos: +prefix dct: +prefix rnce: + +select ?narrowerConcept ?narrowerLabel (group_concat(?altLabel; separator=", ") as ?altLabelsConcatenated) + ?scopeNote ?hiddenLabel ?notation ?codeAbr ?sortperiod + ?broaderConcept ?broaderLabel ?topConcept ?topConceptLabel ?conceptLabel ?status ?statusLabel +where { + graph { + + # Stap 1: Start bij de topconcepten + values ?topConcept { + + + + + } + + # Stap 2: Filter op conceptstatus + values ?status { + # definitief + # kandidaat + #vervallen + } + # Haal het label van de topconcepten op + ?status skos:prefLabel ?statusLabel . + + # Haal het label van de topconcepten op + ?topConcept skos:prefLabel ?topConceptLabel . + + # Stap 3: Zoek alle narrower concepten + ?topConcept skos:narrower+ ?narrowerConcept . + ?narrowerConcept skos:prefLabel ?narrowerLabel . + + # Stap 4: Haal verplichte status op en filter direct + ?narrowerConcept rnce:hasConceptStatus ?status . + optional { + ?narrowerConcept rnce:sortPeriod ?sortperiod . + } + + # Stap 5: Haal optionele gegevens op + optional { + ?narrowerConcept skos:altLabel ?altLabel . + } + optional { + ?narrowerConcept skos:scopeNote ?scopeNote . + } + optional { + ?narrowerConcept skos:hiddenLabel ?hiddenLabel . + } + optional { + ?narrowerConcept skos:notation ?notation . + } + optional { + ?narrowerConcept rnce:codeAbr ?codeAbr . + } + + # Stap 6: Zoek de directe broader van het gevonden narrower concept + optional { + ?narrowerConcept skos:broader ?broaderConcept . + ?broaderConcept skos:prefLabel ?broaderLabel . + } + } +} +group by ?narrowerConcept ?narrowerLabel ?scopeNote ?hiddenLabel ?notation ?codeAbr ?sortperiod +?broaderConcept ?broaderLabel ?topConcept ?topConceptLabel ?conceptLabel ?status ?statusLabel + +order by ?sortperiod ?narrowerLabel + + + diff --git a/LDV/rest-api-gezicht.rq b/LDV/rest-api-gezicht.rq index 26ab92e..3401bec 100644 --- a/LDV/rest-api-gezicht.rq +++ b/LDV/rest-api-gezicht.rq @@ -24,7 +24,7 @@ CONSTRUCT { ?o3 ?p4 ?o4. ?o4 ?p5 ?o5. ?o5 ?p6 ?o6. - ?o6 ?p7 ?o7. + # ?o6 ?p7 ?o7. } WHERE { { # Focus on the graph named 'instanties-rce' within the specified namespace @@ -73,9 +73,9 @@ CONSTRUCT { ?o4 ?p5 ?o5. OPTIONAL { ?o5 ?p6 ?o6. - OPTIONAL { - ?o6 ?p7 ?o7. - } + # OPTIONAL { + # ?o6 ?p7 ?o7. + # } } } } diff --git a/LDV/rest-api-grondsporen.rq b/LDV/rest-api-grondsporen.rq index d3cc5ba..e675a09 100644 --- a/LDV/rest-api-grondsporen.rq +++ b/LDV/rest-api-grondsporen.rq @@ -28,8 +28,8 @@ CONSTRUCT { ?o2 ?p3 ?o3. ?o3 ?p4 ?o4. ?o4 ?p5 ?o5. - ?o5 ?p6 ?o6. - ?o6 ?p7 ?o7. + # ?o5 ?p6 ?o6. + #?o6 ?p7 ?o7. } WHERE { # The GRAPH clause specifies the named graph where the data is retrieved from. GRAPH graph:instanties-rce { diff --git a/LDV/rest-api-vondsten.rq b/LDV/rest-api-vondsten.rq index fbbde7f..dc2d6e4 100644 --- a/LDV/rest-api-vondsten.rq +++ b/LDV/rest-api-vondsten.rq @@ -22,8 +22,8 @@ CONSTRUCT { ?o2 ?p3 ?o3. ?o3 ?p4 ?o4. ?o4 ?p5 ?o5. - ?o5 ?p6 ?o6. - ?o6 ?p7 ?o7. + ?o5 ?p6 ?o6. + # ?o6 ?p7 ?o7. } WHERE { # The GRAPH clause specifies the named graph where the data is retrieved from. GRAPH graph:instanties-rce { diff --git a/LDV/rest-api-vondstlocaties.rq b/LDV/rest-api-vondstlocaties.rq index b95dd34..7b66829 100644 --- a/LDV/rest-api-vondstlocaties.rq +++ b/LDV/rest-api-vondstlocaties.rq @@ -13,7 +13,7 @@ construct { ?o3 ?p4 ?o4. ?o4 ?p5 ?o5. ?o5 ?p6 ?o6. - ?o6 ?p7 ?o7. +# ?o6 ?p7 ?o7. } where { graph graph:instanties-rce { { @@ -82,14 +82,14 @@ construct { ?o3 ?p4 ?o4. optional { ?o4 ?p5 ?o5. - # optional { - # ?o5 ?p6 ?o6. + optional { + ?o5 ?p6 ?o6. # optional { # ?o6 ?p7 ?o7. # } - # } + } } - } + } } } } diff --git a/LDV/rest-api-werelderfgoed.rq b/LDV/rest-api-werelderfgoed.rq index 473dae3..19f365b 100644 --- a/LDV/rest-api-werelderfgoed.rq +++ b/LDV/rest-api-werelderfgoed.rq @@ -24,7 +24,7 @@ CONSTRUCT { ?o3 ?p4 ?o4. ?o4 ?p5 ?o5. ?o5 ?p6 ?o6. - ?o6 ?p7 ?o7. + # ?o6 ?p7 ?o7. } WHERE { GRAPH graph:instanties-rce { { @@ -69,10 +69,10 @@ CONSTRUCT { ?o4 ?p5 ?o5. OPTIONAL { ?o5 ?p6 ?o6. - OPTIONAL { - ?o6 ?p7 ?o7. - } - } + # OPTIONAL { + # ?o6 ?p7 ?o7. + # } + } } } }