--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-primer/example-context.json Wed Dec 04 13:57:05 2013 +0000
@@ -0,0 +1,28 @@
+{
+ "@context": {
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "schema": "http://schema.org/",
+ "dcterms": "http://purl.org/dc/terms/",
+ "wd": "http://www.wikidata.org/entity/",
+ "@base": "http://example.org/",
+ "uri": "@id",
+ "type": "@type",
+ "Person": "foaf:Person",
+ "born": {
+ "@id": "schema:birthDate",
+ "@type": "xsd:date"
+ },
+ "friends": {
+ "@id": "foaf:knows",
+ "@type": "@id"
+ },
+ "interest": "http://xmlns.com/foaf/0.1/topic_interest",
+ "subject_of": {
+ "@reverse": "dcterms:subject",
+ "@type": "@id"
+ },
+ "creator": "dcterms:creator",
+ "title": "dcterms:title",
+ "name": "foaf:name"
+}
--- a/rdf-primer/index.html Tue Dec 03 18:20:35 2013 -0800
+++ b/rdf-primer/index.html Wed Dec 04 13:57:05 2013 +0000
@@ -702,15 +702,12 @@
11 schema:birthDate "1990-07-04"^^xsd:date ;
12 foaf:topic_interest wd:Q12418 .
13
-14 <http://dbpedia.org/resource/Leonardo_da_Vinci>
-15 a foaf:Person ;
-16 foaf:name "Leonardo da Vinci" .
+14 wd:Q12418
+15 dcterms:title "Mona Lisa" ;
+16 dcterms:creator <http://dbpedia.org/resource/Leonardo_da_Vinci> .
17
-18 wd:Q12418
-19 dcterms:creator <http://dbpedia.org/resource/Leonardo_da_Vinci> .
-20
-21 <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D61set>
-22 dcterms:subject wd:Q12418 .
+18 <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619>
+19 dcterms:subject wd:Q12418 .
</pre>
<p>Lines 1-6 contain a number of directives which provide shorthands for
@@ -833,20 +830,17 @@
16
17 <https://www.wikidata.org/wiki/Special:EntityData/Q12418>
18 {
-19 <http://dbpedia.org/resource/Leonardo_da_Vinci>
-20 a foaf:Person ;
-21 foaf:name "Leonardo da Vinci" .
+19 wd:Q12418
+20 dcterms:title "Mona Lisa" ;
+21 dcterms:creator <http://dbpedia.org/resource/Leonardo_da_Vinci> .
22
-23 wd:Q12418
-24 dcterms:creator <http://dbpedia.org/resource/Leonardo_da_Vinci> .
-25
-26 <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619>
-27 dcterms:subject wd:Q12418 .
-28 }
-29
-30 <http://example.org/bob>
-31 dcterms:publisher <http://example.org> ;
-32 dcterms:rights <http://creativecommons.org/licenses/by/3.0/> .
+23 <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619>
+24 dcterms:subject wd:Q12418 .
+25 }
+26
+27 <http://example.org/bob>
+28 dcterms:publisher <http://example.org> ;
+29 dcterms:rights <http://creativecommons.org/licenses/by/3.0/> .
</pre>
<p>This RDF dataset contains two named graphs. Lines 8 and 16 list
@@ -1149,7 +1143,7 @@
13 Bob is interested in <a rel="foaf:topic_interest" resource="wd:Q12418">the Mona Lisa</a>.
14 </p>
15 <div about="wd:Q12418">
-16 The Mona Lisa was painted by <a rel="dcterms:creator" typeof="foaf:Person" href="http://dbpedia.org/resource/Leonardo_da_Vinci"><span property="foaf:name">Leonardo da Vinci</span></a>
+16 The <span property="dcterms:title">Mona Lisa</span> was painted by <a rel="dcterms:creator" href="http://dbpedia.org/resource/Leonardo_da_Vinci">Leonardo da Vinci</a>
17 and is the subject of the video <a rev="dcterms:subject" href="http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619">'La Joconde à Washington'</a>.
18 </div>
19 </div>
@@ -1186,16 +1180,15 @@
19 },
20 "foaf:topic_interest": {
21 "@id": "wd:Q12418",
+22 "dcterms:title": "Mona Lisa",
22 "subject_of": {
23 "@id": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619"
24 },
25 "dcterms:creator": {
-26 "@id": "http://dbpedia.org/resource/Leonardo_da_Vinci",
-27 "@type": "foaf:Person",
-28 "foaf:name": "Leonardo da Vinci"
-29 }
-30 }
-31 }
+26 "@id": "http://dbpedia.org/resource/Leonardo_da_Vinci"
+27 }
+28 }
+29 }
</pre>
<p>Multiple-graphs example:</p>
@@ -1241,17 +1234,16 @@
38 "@id": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619",
39 "dcterms:subject": {
40 "@id": "http://www.wikidata.org/entity/Q12418",
-41 "dcterms:creator": {
-42 "@id": "http://dbpedia.org/resource/Leonardo_da_Vinci",
-43 "@type": "foaf:Person",
-44 "foaf:name": "Leonardo da Vinci"
-45 }
-46 }
-47 }
-48 ]
-49 }
-50 ]
-51 }
+41 "dcterms:title": "Mona Lisa",
+42 "dcterms:creator": {
+43 "@id": "http://dbpedia.org/resource/Leonardo_da_Vinci"
+44 }
+45 }
+46 }
+47 ]
+48 }
+49 ]
+50 }
</pre>
<p>Below is an alternate single-graph example with more idiomatic
@@ -1261,53 +1253,74 @@
<p class="issue">Should we include this alternative example?</p>
<pre class="example">
-01 {
-02 "@context": {
-03 "foaf": "http://xmlns.com/foaf/0.1/",
-04 "xsd": "http://www.w3.org/2001/XMLSchema#",
-05 "schema": "http://schema.org/",
-06 "dcterms": "http://purl.org/dc/terms/",
-07 "wd": "http://www.wikidata.org/entity/",
-08 "@base": "http://example.org/",
+01 {
+02 "@context": {
+03 "foaf": "http://xmlns.com/foaf/0.1/",
+04 "xsd": "http://www.w3.org/2001/XMLSchema#",
+05 "schema": "http://schema.org/",
+06 "dcterms": "http://purl.org/dc/terms/",
+07 "wd": "http://www.wikidata.org/entity/",
+08 "@base": "http://example.org/",
09
-10 "uri": "@id",
-11 "type": "@type",
-12 "Person": "foaf:Person",
-13 "born": {
+10 "uri": "@id",
+11 "type": "@type",
+12 "Person": "foaf:Person",
+13 "born": {
14 "@id": "schema:birthDate",
15 "@type": "xsd:date"
-16 },
-17 "friends": {
+16 },
+17 "friends": {
18 "@id": "foaf:knows",
19 "@type": "@id"
-20 },
-21 "interest": "http://xmlns.com/foaf/0.1/topic_interest",
-22 "subject_of": {
+20 },
+21 "interest": "http://xmlns.com/foaf/0.1/topic_interest",
+22 "subject_of": {
23 "@reverse": "dcterms:subject",
24 "@type": "@id"
-25 },
-26 "creator": "dc:creator",
-27 "name": "foaf:name"
-28 },
-29
-30 "uri": "bob#me",
-31 "type": "Person",
-32 "born": "1990-07-04",
-33 "friends": ["alice#me"],
-34 "interest": [
-35 {
-36 "uri": "wd:Q12418",
-37 "subject_of": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619",
-38 "creator": {
-39 "uri": "http://dbpedia.org/resource/Leonardo_da_Vinci",
-40 "type": "Person",
-41 "name": "Leonardo da Vinci"
+25 },
+26 "creator": "dcterms:creator",
+27 "title": "dcterms:title",
+28 "name": "foaf:name"
+29 },
+30
+31 "uri": "bob#me",
+32 "type": "Person",
+33 "born": "1990-07-04",
+34 "friends": ["alice#me"],
+35 "interest": [
+36 {
+37 "uri": "wd:Q12418",
+38 "title": "Mona Lisa",
+39 "subject_of": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619",
+40 "creator": {
+41 "uri": "http://dbpedia.org/resource/Leonardo_da_Vinci"
42 }
-43 }
-44 ]
-45 }
+43 }
+44 ]
+45 }
</pre>
+The context can also be held in a separate file, as in the following example.
+
+<pre class="example">
+01 {
+02 "context": "example-context.json",
+03 "uri": "bob#me",
+04 "type": "Person",
+05 "born": "1990-07-04",
+06 "friends": ["alice#me"],
+07 "interest": [
+08 {
+09 "uri": "wd:Q12418",
+10 "title": "Mona Lisa",
+11 "subject_of": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619",
+12 "creator": {
+13 "uri": "http://dbpedia.org/resource/Leonardo_da_Vinci"
+14 }
+15 }
+16 ]
+17 }
+</pre>
</section>
@@ -1319,14 +1332,13 @@
<p>Single-graph example: </p>
<pre class="example" id="n-triples-example">
-01 <http://example.org/bob#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>.
-02 <http://example.org/bob#me> <http://xmlns.com/foaf/0.1/knows> <http://example.org/alice#me>.
-03 <http://example.org/bob#me> <http://schema.org/birthDate> "1990-07-04"^^<http://www.w3.org/2001/XMLSchema#date>.
-04 <http://example.org/bob#me> <http://xmlns.com/foaf/0.1/topic_interest> <http://www.wikidata.org/entity/Q12418>.
-05 <http://dbpedia.org/resource/Leonardo_da_Vinci> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>.
-06 <http://dbpedia.org/resource/Leonardo_da_Vinci> <http://xmlns.com/foaf/0.1/name> "Leonardo da Vinci".
-07 <http://www.wikidata.org/entity/Q12418> <http://purl.org/dc/terms/creator> <http://dbpedia.org/resource/Leonardo_da_Vinci>.
-08 <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619> <http://purl.org/dc/terms/subject> <http://www.wikidata.org/entity/Q12418>.
+01 <http://example.org/bob#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+02 <http://example.org/bob#me> <http://xmlns.com/foaf/0.1/knows> <http://example.org/alice#me> .
+03 <http://example.org/bob#me> <http://schema.org/birthDate> "1990-07-04"^^<http://www.w3.org/2001/XMLSchema#date> .
+04 <http://example.org/bob#me> <http://xmlns.com/foaf/0.1/topic_interest> <http://www.wikidata.org/entity/Q12418> .
+05 <http://www.wikidata.org/entity/Q12418> <http://purl.org/dc/terms/title> "Mona Lisa" .
+06 <http://www.wikidata.org/entity/Q12418> <http://purl.org/dc/terms/creator> <http://dbpedia.org/resource/Leonardo_da_Vinci> .
+07 <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619> <http://purl.org/dc/terms/subject> <http://www.wikidata.org/entity/Q12418> .
</pre>
</section>
@@ -1342,12 +1354,11 @@
02 <http://example.org/bob#me> <http://xmlns.com/foaf/0.1/knows> <http://example.org/alice#me> <http://example.org/bob> .
03 <http://example.org/bob#me> <http://schema.org/birthDate> "1990-07-04"^^<http://www.w3.org/2001/XMLSchema#date> <http://example.org/bob> .
04 <http://example.org/bob#me> <http://xmlns.com/foaf/0.1/topic_interest> <http://www.wikidata.org/entity/Q12418> <http://example.org/bob> .
-05 <http://dbpedia.org/resource/Leonardo_da_Vinci> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
-06 <http://dbpedia.org/resource/Leonardo_da_Vinci> <http://xmlns.com/foaf/0.1/name> "Leonardo da Vinci" <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
-07 <http://www.wikidata.org/entity/Q12418> <http://purl.org/dc/terms/creator> <http://dbpedia.org/resource/Leonardo_da_Vinci> <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
-08 <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619> <http://purl.org/dc/terms/subject> <http://www.wikidata.org/entity/Q12418> <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
-09 <http://example.org/bob> <http://purl.org/dc/terms/publisher> <http://example.org> .
-10 <http://example.org/bob> <http://purl.org/dc/terms/rights> <http://creativecommons.org/licenses/by/3.0/> .
+05 <http://www.wikidata.org/entity/Q12418> <http://purl.org/dc/terms/title> "Mona Lisa" <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
+06 <http://www.wikidata.org/entity/Q12418> <http://purl.org/dc/terms/creator> <http://dbpedia.org/resource/Leonardo_da_Vinci> <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
+07 <http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619> <http://purl.org/dc/terms/subject> <http://www.wikidata.org/entity/Q12418> <https://www.wikidata.org/wiki/Special:EntityData/Q12418> .
+08 <http://example.org/bob> <http://purl.org/dc/terms/publisher> <http://example.org> .
+09 <http://example.org/bob> <http://purl.org/dc/terms/rights> <http://creativecommons.org/licenses/by/3.0/> .
</pre>
</section>
@@ -1372,16 +1383,14 @@
11 <foaf:knows rdf:resource="http://example.org/alice#me"/>
12 <foaf:topic_interest rdf:resource="http://www.wikidata.org/entity/Q12418"/>
13 </foaf:Person>
-14 <foaf:Person rdf:about="http://dbpedia.org/resource/Leonardo_da_Vinci">
-15 <foaf:name>Leonardo da Vinci</foaf:name>
-16 </foaf:Person>
-17 <rdf:Description rdf:about="http://www.wikidata.org/entity/Q12418">
-18 <dcterms:creator rdf:resource="http://dbpedia.org/resource/Leonardo_da_Vinci"/>
-19 </rdf:Description>
-20 <rdf:Description rdf:about="http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619">
-21 <dcterms:subject rdf:resource="http://www.wikidata.org/entity/Q12418"/>
-22 </rdf:Description>
-23 </rdf:RDF>
+14 <rdf:Description rdf:about="http://www.wikidata.org/entity/Q12418">
+15 <dcterms:title>Mona Lisa</dcterms:title>
+16 <dcterms:creator rdf:resource="http://dbpedia.org/resource/Leonardo_da_Vinci"/>
+17 </rdf:Description>
+18 <rdf:Description rdf:about="http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619">
+19 <dcterms:subject rdf:resource="http://www.wikidata.org/entity/Q12418"/>
+20 </rdf:Description>
+21 </rdf:RDF>
</pre>
</section>