Skip to content

Instantly share code, notes, and snippets.

@afs
Created April 16, 2020 08:41
Show Gist options
  • Save afs/f7afc2ad3a912ae59f1914c6a56918cc to your computer and use it in GitHub Desktop.
Save afs/f7afc2ad3a912ae59f1914c6a56918cc to your computer and use it in GitHub Desktop.
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
PREFIX ns: <http://example.org/ns#>
PREFIX : <http://example.org/book/>
# This data is intentionaly irregular (e.g. different ways to
# record the book creator) as if the information is either an
# aggregation or was created at different times.
<< :book1 dc:creator "J.K. Rowling" >> dc:source "Bruno" .
<< :book5 dc:creator "J.K. Rowling" >> dc:source "Andy" .
:book1
dc:title "Harry Potter and the Philosopher's Stone" ;
dc:creator "J.K. Rowling" ;
.
:book2
dc:title "Harry Potter and the Chamber of Secrets" ;
dc:creator _:a .
:book3
dc:title "Harry Potter and the Prisoner Of Azkaban" ;
dc:creator _:a .
:book4
dc:title "Harry Potter and the Goblet of Fire" .
:book5
dc:title "Harry Potter and the Order of the Phoenix";
dc:creator "J.K. Rowling" ;
.
:book6
dc:title "Harry Potter and the Half-Blood Prince";
dc:creator "J.K. Rowling" .
:book7
dc:title "Harry Potter and the Deathly Hallows" ;
dc:creator "J.K. Rowling" .
_:a
vcard:FN "J.K. Rowling" ;
vcard:N
[ vcard:Family "Rowling" ;
vcard:Given "Joanna"
]
.
prefix purl: <http://purl.org/dc/elements/1.1/>
prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
prefix dc: <http://purl.org/dc/elements/1.1/>
prefix : <http://example.org/book/>
SELECT ?source ?title
WHERE {
<<?book dc:creator ?author>> dc:source ?source .
?book dc:title ?title .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment