Created
October 15, 2021 21:50
-
-
Save baskaufs/916a5210e8df75a41174dffdf9573d7d to your computer and use it in GitHub Desktop.
SPARQL query to run at https://sparql.vanderbilt.edu/ to find related format concepts
This file contains hidden or 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
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
prefix skos: <http://www.w3.org/2004/02/skos/core#> | |
prefix acformat: <http://rs.tdwg.org/format/values/> | |
select distinct ?broaderConcept ?label ?mediaType ?match ?matchLabel ?fileExtension | |
from <https://tdwg.github.io/rs.tdwg.org/cvJson/format.jsonld> | |
where { | |
# Limit concepts to current terms in pathway scheme | |
?concept skos:inScheme acformat:m. | |
# Find the specified concept and all broader concepts | |
BIND(acformat:m008 AS ?concept) # concept for JPEG media type | |
?concept skos:broader* ?broaderConcept. | |
?match skos:exactMatch ?concept. | |
?concept rdf:value ?mediaType. | |
?match rdf:value ?fileExtension. | |
# Print the English label | |
?broaderConcept skos:prefLabel ?label. | |
filter(lang(?label) = "en") | |
?match skos:prefLabel ?matchLabel. | |
filter(lang(?matchLabel) = "en") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment