Created
October 3, 2023 15:51
-
-
Save baskaufs/82fe18b483f1cd06a78db67270d6e9fc to your computer and use it in GitHub Desktop.
SPARQL query to find P31 class for gallery item and equivalent AAT and Nom concepts
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
SELECT DISTINCT ?work ?workLabel ?class ?classLabel ?otherConcepts ?prefLabel ?nomLabel | |
WHERE { | |
#bind(wd:Q102962863 as ?work) | |
bind(wd:Q104031914 as ?work) | |
?work rdfs:label ?workLabel. | |
?work wdt:P31 ?class. | |
?class rdfs:label ?classLabel. | |
?class skos:exactMatch ?otherConcepts. | |
optional { | |
?otherConcepts skosxl:prefLabel ?labelObject. | |
?labelObject skosxl:literalForm ?prefLabel. | |
filter(lang(?prefLabel)="en") | |
} | |
optional { | |
?otherConcepts skos:prefLabel ?nomLabel. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment