Last active
October 16, 2021 15:56
-
-
Save baskaufs/379a694e1f4e235e3261972995fdfbf0 to your computer and use it in GitHub Desktop.
SPARQL CONSTRUCT query to create a triple for a resource relationship to be run at https://sparql.vanderbilt.edu/
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
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
prefix dcterms: <http://purl.org/dc/terms/> | |
construct {?subject ?predicate ?object} | |
from <https://resourcerelationship> | |
where { | |
bind("http://example.org/.well-known/genid/" as ?skolem) | |
?statement rdf:subject/dcterms:identifier ?subjectID. | |
?statement rdf:predicate/dcterms:identifier ?predicateID. | |
?statement rdf:object/dcterms:identifier ?objectID. | |
bind(iri(concat(?skolem, encode_for_uri(?subjectID))) as ?subject) | |
bind(iri(concat(?skolem, encode_for_uri(?predicateID))) as ?predicate) | |
bind(iri(concat(?skolem, encode_for_uri(?objectID))) as ?object) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment