ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
BIBFRAME:
RDF syntax, BIBFRAME tools, and SPARQL
Beyond MARC
Koha Gruppo Italiano
15-16 March 2016
www.loc.gov/bibframe
What does Linked Data Look like?
https://linkedjazz.org/network/
Joy Nelson - BIBFRAME: RDF syntax, BIBFRAME tools, and SPARQL
@prefix bf: <http://bibframe.org/vocab/> .
@prefix madsrdf: <http://www.loc.gov/mads/rdf/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix relators: <http://id.loc.gov/vocabulary/relators/> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://id.loc.gov//resources/bibs/11669250> a bf:MovingImage,
? ? ? ? bf:Work ;
? ? bf:authorizedAccessPoint "LC Purchase Collection (Library of
Congress) Oliver! / Romulus Production ; director, Carol Reed ;
producer, John Woolf ; screenplay, Vernon Harris.Oliver!",
? ? ? ? "oliverwork"@x-bf-hash ;
? ? bf:contributor [ a bf:Organization ;
? ? ? ? ? ?? ? ? ? ? ? bf:label "LC Purchase Collection (Library of
Congress)" ] ;
? ? bf:hasAnnotation [ a bf:Annotation ;
? ? ? ? bf:annotates <http://id.loc.gov//resources/bibs/11669250> ;
? ? ? ? bf:changeDate "0000-00-00T00:00" ;
? ? ? ? bf:derivedFrom <http://id.loc.gov//resources/bibs/
11669250.marcxml.xml> ;
? ? ? ? bf:hasInstance [ a bf:Instance, bf:Monograph ;
? ? ? ? bf:creditsNote "Credits: Book, music, and lyrics by Lionel
Bart." ;
? ? ? ? bf:dimensions "12 in. viewing copy." ;
? ? ? ? bf:extent "2 videodiscs of 2 (laser) :" ;
? ? ? ? bf:illustrationNote "sd., col. ;" ;
? ? ? ? bf:immediateAcquisition "Received: 11/7/91; viewing copy;
purchase, purchase order no. 172525; LC Purchase Collection." ;
? ? ? ? bf:instanceOf <http://id.loc.gov//resources/bibs/
11669250> ;
? ? ? ? bf:instanceTitle [ a bf:Title ;
? ? ? ? ? ? bf:label "Oliver! / Romulus Production ; director,
Carol Reed ; producer, John Woolf ; screenplay, Vernon Harris." ;
? ? ? ? ? ? bf:titleValue "Oliver!" ] ;
? ? ? ? bf:lccn [ a bf:Identifier ];
? ? ? ? bf:legalDeposit [ a bf:Identifier ;
? ? ? ? ? ? ? ? ? ? bf:identifierAssigner "U.S. Copyright Office" ;
? ? ? ? ? ? ? ? ? ? bf:identifierValue "LP36464" ] ;
? ? ? ? bf:modeOfIssuance "single unit" ;
? ? ? ? bf:note "Copyright: Warwick Film Productions, Ltd.; 1Dec68;
LP36464.",
? ? ? ? ? ? ? ? "Freely adapted from Charles Dickens' Oliver
Twist.",
? ? ? ? ? ? ? ? "On disc label: 30526.",
? ? ? ? ? ? ? ? "Source used: video packaging.",
? ? ? ? ? ? ? ? "Two discs in one jacket." ;
? ? ? ? ? ? bf:performerNote "Cast: Ron Moody, Shani Wallis, Oliver
Reed, Harry Secombe, Mark Lester, Jack Wild, Hugh Griffith, Joseph
O'Connor, Peggy Mount, Leonard Rossiter." ;
? ? ? ? ? ? bf:providerStatement "United States : Columbia
Pictures, 1969 ; United States : RCA Columbia Pictures Home Video,
1985." ;
? ? ? ? ? ? bf:publication [ a bf:Provider ;
? ? ? ? ? ? ? ? ? ? bf:providerDate "1969 ;" ;
? ? ? ? ? ? ? ? ? ? bf:providerName [ a bf:Organization ;
? ? ? ? ? ? ? ? ? ? ? ? ? ? bf:label "Columbia Pictures" ] ;
? ? ? ? ? ? ? ? ? ? bf:providerPlace [ a bf:Place ;
? ? ? ? ? ? ? ? ? ? ? ? ? ? bf:label "United States " ] ],
? ? ? ? ? ? ? ? [ a bf:Provider ;
? ? ? ? ? ? ? ? ? ? bf:providerDate "1985" ;
? ? ? ? ? ? ? ? ? ? bf:providerName [ a bf:Organization ;
? ? ? ? ? ? ? ? ? ? ? ? ? ? bf:label "RCA Columbia Pictures Home
Video" ] ;
? ? ? ? ? ? ? ? ? ? bf:providerPlace [ a bf:Place ;
? ? ? ? ? ? ? ? ? ? ? ? ? ? bf:label "United States " ] ] ;
? ? ? ? ? ? bf:soundContent "Sound on medium",
? ? ? ? ? ? ? ? "Videodisc" ;
? ? ? ? ? ? bf:titleStatement "Oliver!" ] ;
? ? bf:language <http://id.loc.gov/vocabulary/languages/eng> ;
? ? bf:subject [ a bf:Topic ;
? ? ? ? ? ? bf:authoritySource "http://id.loc.gov/vocabulary/
subjectSchemes/gmgpc" ;
? ? ? ? ? bf:authorizedAccessPoint "Videodiscs" ;
? ? ? ? ? ? bf:hasAuthority [ a madsrdf:Authority,
? ? ? ? ? ? ? ? ? ? ? ? madsrdf:GenreForm ;
? ? ? ? ? ? ? ? ? ? madsrdf:authoritativeLabel "Videodiscs" ;
? ? ? ? ? ? ? ? ? ? madsrdf:isMemberOfMADSScheme <http://
id.loc.gov/vocabulary/subjectSchemes/gmgpc> ] ;
? ? ? ? ? ? bf:label "Videodiscs" ],
? ? ? ? [ a bf:Topic ;
? ? ? ? ? ? bf:authoritySource "http://id.loc.gov/vocabulary/
subjectSchemes/mim" ;
? ? ? ? ? ? bf:authorizedAccessPoint "Features" ;
? ? ? ? ? ? bf:hasAuthority [ a madsrdf:Authority,
? ? ? ? ? ? ? ? ? ? ? ? madsrdf:GenreForm ;
? ? ? ? ? ? ? ? ? ? madsrdf:authoritativeLabel "Features" ;
? ? ? ? ? ? ? ? ? ? madsrdf:isMemberOfMADSScheme <http://
id.loc.gov/vocabulary/subjectSchemes/mim> ] ;
? ? ? ? ? ? bf:label "Features" ],
? ? ? ? [ a bf:Topic ;
? ? ? ? ? ? bf:authoritySource "http://id.loc.gov/vocabulary/
BIBFRAME EXAMPLE
<http://www.example.org/n198> a bf:Instance.
<http://www.example.org/n198> a bf:Monograph.
<http://www.example.org/n198> bf:dimensions ¡°24cm.¡±.
<http://www.example.org/n198> a bf:Instance;
a bf:Monograph;
bf:dimensions ¡°24cm.¡±.
<http://www.example.org/n198> a bf:Instance, bf:Monograph;
bf:dimensions ¡°24cm.¡±.
SYNTAX
<http://bibframe.org/resources/YYg1/11instance13> a bf:Instance, bf:Monograph ;
bf:dimensions "12 in. viewing copy." ;
bf:extent "2 videodiscs of 2 (laser) :" ;
bf:instanceOf <http://bibframe.org/resources/YYg1454953912/11669250> ;
bf:lccn [ a bf:Identi?er ;
bf:identi?erScheme <http://id.loc.gov/vocabulary/identi?ers/lccn> ;
bf:identi?erValue "96503764" ] ;
bf:providerStatement "United States : Columbia Pictures, 1969" ;
bf:publication [ a bf:Provider ;
bf:providerDate "1969 ;" ;
bf:providerName [ a bf:Organization ;
bf:label "Columbia Pictures" ] ;
bf:providerPlace [ a bf:Place ;
bf:label "United States " ] ],
bf:soundContent "Sound on medium",
"Videodisc" ;
bf:titleStatement "Oliver!" .
SYNTAX, part 2
Create some Triples
Graph those Triples
Activity 1
http://docs.oracle.com/cd/E15586_01/webcenter.1111/e10148/jpsdg_recommend.htm
BIBFRAME Tools
http://www.loc.gov/bibframe/tools/
BIBFRAME editor
BIBFRAME transformation service
BIBFRAME to MARC comparison
www.bibcat.org
BIBFRAME access and discovery platform
Joy¡¯s Test Server
joy.test.bywatersolutions.com/bfe/#
http://bibframe.org/vocab
BIBFRAMEVocabulary
Use the Tools!
Activity 2
https://en.wikipedia.org/wiki/Manuscript_culture#/media/File:Escribano.jpg
RDA and BIBFRAME Tools
www.loc.gov/catworkshop/bibframe/
Module3Unit2External.pdf
https://www.loc.gov/catworkshop/RDA training materials/
DCatRDA/index.html
SPARQL
RDF query language
SPARQL
Protocol
and
RDF
Query
Language
SELECT * WHERE { ?s ?p ?o . }
SELECT * WHERE { ?s ?p ?o . }
SELECT * WHERE { ?s ?p ?o . } LIMIT 10
SELECT * WHERE { ?s ?p ?o . } LIMIT 10
OFFSET 10000
SELECT ?property ?hasValue ?isValueOf
WHERE {
{ <http://dbpedia.org/resource/Paris,_Texas> ?property ?hasValue }
UNION
{ ?isValueOf ?property <http://dbpedia.org/resource/Paris,_Texas> }
}
Joy Nelson - BIBFRAME: RDF syntax, BIBFRAME tools, and SPARQL
SELECT ?comment
WHERE {
<http://dbpedia.org/resource/Paris,_Texas> rdfs:comment ?comment .
}
Joy Nelson - BIBFRAME: RDF syntax, BIBFRAME tools, and SPARQL
SELECT ?comment
WHERE {
<http://dbpedia.org/resource/Paris,_Texas>
rdfs:comment ?comment .
FILTER (langMatches(lang(?comment),"en")) .
}
Joy Nelson - BIBFRAME: RDF syntax, BIBFRAME tools, and SPARQL
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?comment ?abs
WHERE {
<http://dbpedia.org/resource/Paris,_Texas> rdfs:comment ?comment .
FILTER (langMatches(lang(?comment),"en")) .
<http://dbpedia.org/resource/Paris,_Texas> dbo:abstract ?abs .
FILTER (langMatches(lang(?abs), "en")) .
}
Joy Nelson - BIBFRAME: RDF syntax, BIBFRAME tools, and SPARQL
https://commons.wikimedia.org/wiki/
File:Anyjazz65_-_Paris,_Texas_-
_Eiffel_tower_replica.jpg
Activity 3
SNORQL-ing!
dbpedia.org/SNORQL

More Related Content

Joy Nelson - BIBFRAME: RDF syntax, BIBFRAME tools, and SPARQL

  • 1. BIBFRAME: RDF syntax, BIBFRAME tools, and SPARQL Beyond MARC Koha Gruppo Italiano 15-16 March 2016 www.loc.gov/bibframe
  • 2. What does Linked Data Look like? https://linkedjazz.org/network/
  • 4. @prefix bf: <http://bibframe.org/vocab/> . @prefix madsrdf: <http://www.loc.gov/mads/rdf/v1#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix relators: <http://id.loc.gov/vocabulary/relators/> . @prefix xml: <http://www.w3.org/XML/1998/namespace> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://id.loc.gov//resources/bibs/11669250> a bf:MovingImage, ? ? ? ? bf:Work ; ? ? bf:authorizedAccessPoint "LC Purchase Collection (Library of Congress) Oliver! / Romulus Production ; director, Carol Reed ; producer, John Woolf ; screenplay, Vernon Harris.Oliver!", ? ? ? ? "oliverwork"@x-bf-hash ; ? ? bf:contributor [ a bf:Organization ; ? ? ? ? ? ?? ? ? ? ? ? bf:label "LC Purchase Collection (Library of Congress)" ] ; ? ? bf:hasAnnotation [ a bf:Annotation ; ? ? ? ? bf:annotates <http://id.loc.gov//resources/bibs/11669250> ; ? ? ? ? bf:changeDate "0000-00-00T00:00" ; ? ? ? ? bf:derivedFrom <http://id.loc.gov//resources/bibs/ 11669250.marcxml.xml> ; ? ? ? ? bf:hasInstance [ a bf:Instance, bf:Monograph ; ? ? ? ? bf:creditsNote "Credits: Book, music, and lyrics by Lionel Bart." ; ? ? ? ? bf:dimensions "12 in. viewing copy." ; ? ? ? ? bf:extent "2 videodiscs of 2 (laser) :" ; ? ? ? ? bf:illustrationNote "sd., col. ;" ; ? ? ? ? bf:immediateAcquisition "Received: 11/7/91; viewing copy; purchase, purchase order no. 172525; LC Purchase Collection." ; ? ? ? ? bf:instanceOf <http://id.loc.gov//resources/bibs/ 11669250> ; ? ? ? ? bf:instanceTitle [ a bf:Title ; ? ? ? ? ? ? bf:label "Oliver! / Romulus Production ; director, Carol Reed ; producer, John Woolf ; screenplay, Vernon Harris." ; ? ? ? ? ? ? bf:titleValue "Oliver!" ] ; ? ? ? ? bf:lccn [ a bf:Identifier ]; ? ? ? ? bf:legalDeposit [ a bf:Identifier ; ? ? ? ? ? ? ? ? ? ? bf:identifierAssigner "U.S. Copyright Office" ; ? ? ? ? ? ? ? ? ? ? bf:identifierValue "LP36464" ] ; ? ? ? ? bf:modeOfIssuance "single unit" ; ? ? ? ? bf:note "Copyright: Warwick Film Productions, Ltd.; 1Dec68; LP36464.", ? ? ? ? ? ? ? ? "Freely adapted from Charles Dickens' Oliver Twist.", ? ? ? ? ? ? ? ? "On disc label: 30526.", ? ? ? ? ? ? ? ? "Source used: video packaging.", ? ? ? ? ? ? ? ? "Two discs in one jacket." ; ? ? ? ? ? ? bf:performerNote "Cast: Ron Moody, Shani Wallis, Oliver Reed, Harry Secombe, Mark Lester, Jack Wild, Hugh Griffith, Joseph O'Connor, Peggy Mount, Leonard Rossiter." ; ? ? ? ? ? ? bf:providerStatement "United States : Columbia Pictures, 1969 ; United States : RCA Columbia Pictures Home Video, 1985." ; ? ? ? ? ? ? bf:publication [ a bf:Provider ; ? ? ? ? ? ? ? ? ? ? bf:providerDate "1969 ;" ; ? ? ? ? ? ? ? ? ? ? bf:providerName [ a bf:Organization ; ? ? ? ? ? ? ? ? ? ? ? ? ? ? bf:label "Columbia Pictures" ] ; ? ? ? ? ? ? ? ? ? ? bf:providerPlace [ a bf:Place ; ? ? ? ? ? ? ? ? ? ? ? ? ? ? bf:label "United States " ] ], ? ? ? ? ? ? ? ? [ a bf:Provider ; ? ? ? ? ? ? ? ? ? ? bf:providerDate "1985" ; ? ? ? ? ? ? ? ? ? ? bf:providerName [ a bf:Organization ; ? ? ? ? ? ? ? ? ? ? ? ? ? ? bf:label "RCA Columbia Pictures Home Video" ] ; ? ? ? ? ? ? ? ? ? ? bf:providerPlace [ a bf:Place ; ? ? ? ? ? ? ? ? ? ? ? ? ? ? bf:label "United States " ] ] ; ? ? ? ? ? ? bf:soundContent "Sound on medium", ? ? ? ? ? ? ? ? "Videodisc" ; ? ? ? ? ? ? bf:titleStatement "Oliver!" ] ; ? ? bf:language <http://id.loc.gov/vocabulary/languages/eng> ; ? ? bf:subject [ a bf:Topic ; ? ? ? ? ? ? bf:authoritySource "http://id.loc.gov/vocabulary/ subjectSchemes/gmgpc" ; ? ? ? ? ? bf:authorizedAccessPoint "Videodiscs" ; ? ? ? ? ? ? bf:hasAuthority [ a madsrdf:Authority, ? ? ? ? ? ? ? ? ? ? ? ? madsrdf:GenreForm ; ? ? ? ? ? ? ? ? ? ? madsrdf:authoritativeLabel "Videodiscs" ; ? ? ? ? ? ? ? ? ? ? madsrdf:isMemberOfMADSScheme <http:// id.loc.gov/vocabulary/subjectSchemes/gmgpc> ] ; ? ? ? ? ? ? bf:label "Videodiscs" ], ? ? ? ? [ a bf:Topic ; ? ? ? ? ? ? bf:authoritySource "http://id.loc.gov/vocabulary/ subjectSchemes/mim" ; ? ? ? ? ? ? bf:authorizedAccessPoint "Features" ; ? ? ? ? ? ? bf:hasAuthority [ a madsrdf:Authority, ? ? ? ? ? ? ? ? ? ? ? ? madsrdf:GenreForm ; ? ? ? ? ? ? ? ? ? ? madsrdf:authoritativeLabel "Features" ; ? ? ? ? ? ? ? ? ? ? madsrdf:isMemberOfMADSScheme <http:// id.loc.gov/vocabulary/subjectSchemes/mim> ] ; ? ? ? ? ? ? bf:label "Features" ], ? ? ? ? [ a bf:Topic ; ? ? ? ? ? ? bf:authoritySource "http://id.loc.gov/vocabulary/ BIBFRAME EXAMPLE
  • 5. <http://www.example.org/n198> a bf:Instance. <http://www.example.org/n198> a bf:Monograph. <http://www.example.org/n198> bf:dimensions ¡°24cm.¡±. <http://www.example.org/n198> a bf:Instance; a bf:Monograph; bf:dimensions ¡°24cm.¡±. <http://www.example.org/n198> a bf:Instance, bf:Monograph; bf:dimensions ¡°24cm.¡±. SYNTAX
  • 6. <http://bibframe.org/resources/YYg1/11instance13> a bf:Instance, bf:Monograph ; bf:dimensions "12 in. viewing copy." ; bf:extent "2 videodiscs of 2 (laser) :" ; bf:instanceOf <http://bibframe.org/resources/YYg1454953912/11669250> ; bf:lccn [ a bf:Identi?er ; bf:identi?erScheme <http://id.loc.gov/vocabulary/identi?ers/lccn> ; bf:identi?erValue "96503764" ] ; bf:providerStatement "United States : Columbia Pictures, 1969" ; bf:publication [ a bf:Provider ; bf:providerDate "1969 ;" ; bf:providerName [ a bf:Organization ; bf:label "Columbia Pictures" ] ; bf:providerPlace [ a bf:Place ; bf:label "United States " ] ], bf:soundContent "Sound on medium", "Videodisc" ; bf:titleStatement "Oliver!" . SYNTAX, part 2
  • 7. Create some Triples Graph those Triples Activity 1 http://docs.oracle.com/cd/E15586_01/webcenter.1111/e10148/jpsdg_recommend.htm
  • 8. BIBFRAME Tools http://www.loc.gov/bibframe/tools/ BIBFRAME editor BIBFRAME transformation service BIBFRAME to MARC comparison www.bibcat.org BIBFRAME access and discovery platform Joy¡¯s Test Server joy.test.bywatersolutions.com/bfe/# http://bibframe.org/vocab BIBFRAMEVocabulary
  • 9. Use the Tools! Activity 2 https://en.wikipedia.org/wiki/Manuscript_culture#/media/File:Escribano.jpg
  • 10. RDA and BIBFRAME Tools www.loc.gov/catworkshop/bibframe/ Module3Unit2External.pdf https://www.loc.gov/catworkshop/RDA training materials/ DCatRDA/index.html
  • 12. SELECT * WHERE { ?s ?p ?o . }
  • 13. SELECT * WHERE { ?s ?p ?o . }
  • 14. SELECT * WHERE { ?s ?p ?o . } LIMIT 10
  • 15. SELECT * WHERE { ?s ?p ?o . } LIMIT 10 OFFSET 10000
  • 16. SELECT ?property ?hasValue ?isValueOf WHERE { { <http://dbpedia.org/resource/Paris,_Texas> ?property ?hasValue } UNION { ?isValueOf ?property <http://dbpedia.org/resource/Paris,_Texas> } }
  • 20. SELECT ?comment WHERE { <http://dbpedia.org/resource/Paris,_Texas> rdfs:comment ?comment . FILTER (langMatches(lang(?comment),"en")) . }
  • 22. PREFIX dbo: <http://dbpedia.org/ontology/> SELECT ?comment ?abs WHERE { <http://dbpedia.org/resource/Paris,_Texas> rdfs:comment ?comment . FILTER (langMatches(lang(?comment),"en")) . <http://dbpedia.org/resource/Paris,_Texas> dbo:abstract ?abs . FILTER (langMatches(lang(?abs), "en")) . }