<samples9298996> rdf:type bf:Text ; rdf:type bf:Work ; bf:title "Oliver Twist." ; bf:class <id.loc.gov/…/PZ3> ; bf:creator [ rdf:type bf:Person ; bf:label "Dickens, Charles, 1812-1870." ; ] . <id.loc.gov/…/PZ3> rdf:type bf:LCC ; bf:label "PZ3.D55O165PR4567" .
<samples9298996> rdf:type bf:Text ; rdf:type bf:Work ; bf:title "Oliver Twist." ; bf:class <id.loc.gov/…/PZ3> ; bf:creator [ rdf:type bf:Person ; bf:label "Dickens, Charles, 1812-1870." ; ] . <id.loc.gov/…/PZ3> rdf:type bf:LCC ; bf:label "PZ3.D55O165PR4567" .
<Work> EXTRA rdf:type { rdf:type [bf:Work] ? ; bf:title LITERAL ; bf:class @<Classification> * ; bf:creator @<Person> OR @<Organization> + ; bf:derivedFrom IRI * ; } <Classification> [<http://id.loc.gov/…/>~] AND EXTRA rdf:type { rdf:type [bf:LCC] ? ; bf:label LITERAL ; }
validating samples9298996bad as Work: validating http://...oliverTwist: Error validating http://...oliverTwist as nodeKind literal: iri found when literal expected
inst:Alice @ school:Enrollee, inst:Bob @ school:Enrollee, inst:Claire @ school:Enrollee, inst:Don @ school:Enrollee
{FOCUS, foaf:age, _} @ school:Enrollee
<Work> EXTRA rdf:type { rdf:type [bf:Work] ? ; bf:title LITERAL ; bf:class @<Classification> * ; bf:creator @<Person> OR @<Organization> + ; bf:derivedFrom IRI * ; } <Classification> [<http://id.loc.gov/…/>~] AND EXTRA rdf:type { rdf:type [bf:LCC] ? ; bf:label LITERAL ; }
<Work> EXTRA rdf:type { rdf:type [bf:Work] ? ; bf:title LITERAL ; bf:class @<Classification> * ; bf:creator @<Person> OR @<Organization> + ; bf:derivedFrom IRI * ; } <Classification> [<http://id.loc.gov/…/>~] AND EXTRA rdf:type { rdf:type [bf:LCC] ? ; bf:label LITERAL ; }
<Work> EXTRA rdf:type { rdf:type [bf:Work] ? ; bf:title LITERAL ; bf:class @<Classification> * ; bf:creator @<Person> OR @<Organization> + ; bf:derivedFrom IRI * ; } <Classification> [<http://id.loc.gov/…/>~] AND EXTRA rdf:type { rdf:type [bf:LCC] ? ; bf:label LITERAL ; }
<samples9298996> rdf:type bf:Text ; rdf:type bf:Work ; bf:title "Oliver Twist." ; bf:class <id.loc.gov/…/PZ3> ; bf:creator [ rdf:type bf:Person ; bf:label "Dickens, Charles, 1812-1870." ; ] . <id.loc.gov/…/PZ3> rdf:type bf:LCC ; bf:label "PZ3.D55O165PR4567" .
A <Work> must have exactly one bf:title with value LITERAL:
<Work> { bf:title LITERAL ; }
<samples9298996> bf:title "Oliver Twist." . <samples9298996bad> bf:title <http://...oliverTwist> .try it
validating samples9298996bad as Work: validating http://...oliverTwist: Error validating http://...oliverTwist as nodeKind literal: iri found when literal expected
Permit some data to have a type arc identifying it as a <Work>:
<Work> { rdf:type [bf:Work] ? ; bf:label LITERAL ; }
[]
s denote a value set.?
' code means min: 0, max: 1 (like regular expressions).<samples9298996> a bf:Work ; bf:title "Oliver Twist." . <samples9298996b> a bf:Work ; bf:title "Oliver Twist." . <samples9298996bad> a bf:Krow ; bf:title "Oliver Twist" .try it
validating samples9298996bad as Work: validating http://bibframe.org/vocab/Krow: Error validating http://bibframe.org/vocab/Krow as values [<http://bibframe.org/vocab/Work>]: value http://bibframe.org/vocab/Krow not found in set [<http://bibframe.org/vocab/Work>]
Add a reference to another shape:
<Work> { rdf:type [bf:Work] ? ; bf:label LITERAL ; bf:class @<Classification> * ; } <Classification> { rdf:type [bf:LCC] ? ; bf:label LITERAL ; }
*
' code means min: 0, max: * (like regular expressions).<samples9298996> bf:title "Oliver Twist." ; bf:class <http://id.loc.gov/…/PZ3> . <http://id.loc.gov/…/PZ3> a bf:LCC ; bf:label "PZ3.D55O165PR4567" . <samples9298996b> bf:title "Oliver Twist." ; bf:class [ bf:label "PZ3.D55O165PR4567" ]. <samples9298996bad> bf:title "Oliver Twist." ; bf:class [ a bf:LCD ; bf:label "PZ3.D55O165PR4567" ].try it
validating samples9298996bad as Work: validating _:b1: validating http://bibframe.org/vocab/LCD:, Error validating http://bibframe.org/vocab/LCD as values: [<http://bibframe.org/vocab/LCC>]}: value <http://bibframe.org/vocab/LCD> not found in set [<http://bibframe.org/vocab/LCC>]
Or a reference to an authority:
<Work> { rdf:type [bf:Work] ? ; bf:label LITERAL ; bf:class @<Classification> * ; } <Classification> [<http://id.loc.gov/…/>~]
[]
s denote a value set.<samples9298996> bf:title "Oliver Twist." ; bf:class <http://id.loc.gov/…/PZ3> . <samples9298996bad> bf:title "Oliver Twist." ; bf:class <http://id.loc.gov/authorities/PZ3> . <samples9298996badb> bf:title "Oliver Twist." ; bf:class [ bf:label "PZ3.D55O165PR4567" ].try it
validating samples9298996bad as Work: validating <http://id.loc.gov/authorities/PZ3>: NodeConstraintError: expected to match [<http://id.loc.gov/authorities/classification/>~]
validating samples9298996bad as Work: validating _:b0: NodeConstraintError: expected to match [<http://id.loc.gov/authorities/classification/>~]
Or a reference to a structure identifed by and authority:
<Work> { rdf:type [bf:Work] ? ; bf:label LITERAL ; bf:class @<Classification> * ; } <Classification> [<http://id.loc.gov/…/>~] AND { rdf:type [bf:LCC] ? ; bf:label LITERAL ; }
()
s.<samples9298996> bf:title "Oliver Twist." ; bf:class <http://id.loc.gov/…/PZ3> . <http://id.loc.gov/…/PZ3> a bf:LCC ; bf:label "PZ3.D55O165PR4567" . <samples9298996bad> bf:title "Oliver Twist." ; bf:class <http://id.loc.gov/authorities/PZ3> . <http://id.loc.gov/authorities/PZ3> a bf:LCC ; bf:label "PZ3.D55O165PR4567" . <samples9298996badb> bf:title "Oliver Twist." ; bf:class <http://id.loc.gov/…/PZ3999> .try it
validating samples9298996bad as Work: validating >http://id.loc.gov/authorities/PZ3>: validating <http://id.loc.gov/authorities/PZ3> as Classification: NodeConstraintError: expected to match [<http://id.loc.gov/…/>~]
validating samples9298996bad as Work: validating <http://id.loc.gov/…/PZ3999>: validating <http://id.loc.gov/…/PZ3999> as Classification: Missing property: <http://bibframe.org/vocab/label>
You may accept multiple forms of creator.
<Work> { rdf:type [bf:Work] ? ; bf:label LITERAL ; bf:class . * ; bf:creator @<Person> OR @<Organization> + ; } <Person> { rdf:type [bf:Person] ? ; bf:label LITERAL ; } <Organization> { EXTRA rdf:type rdf:type [bf:Organization] ; bf:label LITERAL ; org:member @<Person> OR @<Organization> * }
<samples9298996> bf:title "Oliver Twist." ; bf:creator [ rdf:type bf:Person ; bf:label "Dickens, Charles, 1812-1870." ] . <wp-55-45-1> bf:title "Nixon blasts 'false charges'" ; bf:creator <WP> . <WP> rdf:type bf:Organization , bf:Newpaper ; bf:label "Washington Post" ; org:member <BobWoodward>, <CarlBernstein> . <BobWoodward> bf:label "Bob Woodward" . <CarlBernstein> bf:label "Carl Bernstein" .try it
# Shape Expression for Diseases in Wikidata PREFIX wd: <http://www.wikidata.org/entity/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX pr: <http://www.wikidata.org/prop/reference/> PREFIX prov: <http://www.w3.org/ns/prov#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX do: <http://purl.obolibrary.org/obo/DOID_> start = @<wikidata-disease> <wikidata-disease> { p:P31 { # instance of disease ps:P31 [ wd:Q12136 ]; # instance of disease $<has-do-reference> prov:wasDerivedFrom @<do-reference>; } ; p:P279 { # subclass of ps:P279 @<wikidata-disease>; &<has-do-reference> } * ; p:P2888 EXTRA prov:wasDerivedFrom { # exact match ps:P2888 [ do:~ ]; prov:wasDerivedFrom @<do-reference> ? } + ; } <do-reference> { # stated in pr:P248 @<version-disease-ontology> ; # retrieved pr:P813 xsd:dateTime ; # Disease ontology ID pr:P699 @<disease-ontology-id> ; } <disease-ontology-id> LITERAL /^DOID:[0-9]+$/ <version-disease-ontology> { # edition or translation of Disease Ontology p:P629 { ps:P629 [ wd:Q5282129 ] } ; }
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX prov: <http://www.w3.org/ns/prov#> PREFIX p: <http://www.wikidata.org/prop/> PREFIX pr: <http://www.wikidata.org/prop/reference/> PREFIX ps: <http://www.wikidata.org/prop/statement/> start = @<wikidata_item> <wikidata_item> { p:P1748 { ps:P1748 LITERAL ; prov:wasDerivedFrom @<reference> }+ } <reference> { pr:P248 IRI ; pr:P813 xsd:dateTime ; pr:P699 LITERAL }
Endpoint: https://query.wikidata.org/bigdata/namespace/wdq/sparql Query: SELECT ?item ?itemLabel WHERE { ?item wdt:P279* wd:Q12078 . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } LIMIT 10
(data:sourceURL IRI; data:contentType xsd:string)?
foaf:name LITERAL | foaf:givenName LITERAL; foaf:familyName LITERAL
<Person> { foaf:knows @<Person> }
fhir:component { fhir:code [sct:systolic]; fhir:value xsd:integer };
fhir:component { fhir:code [sct:diastolic]; fhir:value xsd:integer };