added PAs JSON-LD example
authorGuus Schreiber <guus.schreiber@vu.nl>
Mon, 02 Dec 2013 16:37:11 +0100
changeset 1437 2cac0bb3b3cc
parent 1436 4fdb81502f43
child 1438 11cb2a020b15
added PAs JSON-LD example
more about Pats comments
rdf-primer/index.html
--- a/rdf-primer/index.html	Mon Dec 02 14:44:01 2013 +0100
+++ b/rdf-primer/index.html	Mon Dec 02 16:37:11 2013 +0100
@@ -458,14 +458,26 @@
         &lt;The video 'La Joconde à Washington'&gt; &lt;is about&gt; &lt;the Mona Lisa&gt;
       </pre>
 
-      <p>We can then make statements about these two graphs, for
-      example adding license and provenance information:</p>
+      <p>We can then write down triples that include a graph name,
+      for example:</p>
 
       <pre>
         &lt;http://example.org/bob&gt; &lt;is published by&gt; &lt;http://example.org&gt;.
         &lt;http://example.org/bob&gt; &lt;has license&gt; &lt;http://creativecommons.org/licenses/by/3.0/&gt;.
       </pre>
 
+      <p>These two triples could be interpreted as license and
+      provenance information of the graph
+      <code>http://example.org/bob</code>.</p>
+
+      <p class="note">RDF does not define the way in which the graph name
+      and the graph are related. It is therefore up to application developers to
+      decide how to interpret such triples.</p>
+
+      <p class="issue">The text above is still being debated and may
+      be adapted/removed in future versions. 
+      </p>
+
       <p>Multiple graphs in a RDF document constitute an <a
       href="http://www.w3.org/TR/rdf11-concepts/#section-dataset">RDF 
       dataset</a>. An RDF dataset may have multiple named graphs and
@@ -490,6 +502,8 @@
       <figcaption>Informal graph of the multiple graphs example</figcaption>
     </figure>
 
+    <p class="issue">Todo: include figure</p>
+
     </section>
 
 </section>
@@ -511,17 +525,19 @@
     characteristics of
     RDF data. For example, one can state that the IRI 
     <code>ex:friendOf</code> can be used as a property and that the
-    domain and
-    range of this property must be resources of class
+    subjects and objects of <code>ex:friendOf</code> triples must be resources of class
     </code>ex:Person</code>. <p>
 
-    <p class="issue">Should we explain what a domain/range is?</p>
-
-    <p>RDF Schema uses the notion of "class" to
+    <p>RDF Schema uses the notion of <strong>class</strong> to
     specify categories that can be used to classify resources. The
     relation between an instance and its class is modelled through the
-    "type" property. The main modeling
-    constructs in RDF Schema are listed in the table below:</p>
+    <strong>type</strong> property. For both classes and properties one can create
+    subtype hierarchies. Type restrictions on the subjects
+    and objects of particular triples can be defined through
+    <strong>domain</strong> respectively <strong>range</strong> restrictions.</p>
+
+    <p>The main modeling
+    constructs provided by RDF Schema are summarized in the table below:</p>
 
 
 <table id="table-rdf-schema">
@@ -605,9 +621,6 @@
   webpages, so that search engines understand what the pages are
   about.</dd>
 
-  <div class="issue">Check with DanBri about how to formulate
-  relationship between schema.org and RDF schema.</div>
-  
   <dt><a href="http://wordnet.princeton.edu/">WordNet</a></dt>
   <dd>WordNet is a lexical database of English terms, grouped in sets
   of synonyms, with a range of semantic interrelations. W3C make an
@@ -653,10 +666,6 @@
     corresponding samples for the Turtle and TriG examples in this
     section. </p>
 
-    <p class="issue">
-    TODO: Add graph diagram to stress abstract graph syntax.
-    </p>
-
     <section id="subsection-turtle">
 
       <h3>Turtle</h3>
@@ -670,14 +679,6 @@
       <a href="#subsection-triple">first example</a> can be
       represented in Turtle as follows:</p>
 
-      <p class="issue">In the code below prefixes are used. One commenter
-      has said that the example would have been clearer if the
-      unabbreviated IRI had been used in the sample triples (here is the
-      comment wich includes <a
-      href="http://lists.w3.org/Archives/Public/public-rdf-wg/2013Nov/0062.html">alternative 
-      code</a>). We welcome the 
-      view of other readers on this.</p>
-
       <pre class="example" id="turtle-example">
 01    @base &lt;http://example.org/&gt; .
 02    @prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
@@ -1024,6 +1025,7 @@
 
     <p>A list of datasets available within the Linked Data cloud is maintained at
     <a href="http://datahub.io/organization/lodcloud">datahub.io</a>.</p>
+
     
 </section>
 
@@ -1168,6 +1170,61 @@
 51    }
       </pre>
 
+<p>Below is an alternate single-graph example with more idiomatic
+JSON data, at the cost of a more elaborate definition of
+<code>@context</code>. </p>
+
+<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/",
+09
+10      "uri": "@id",
+11      "type": "@type",
+12      "Person": "foaf:Person",
+13      "born": {
+14          "@id": "schema:birthDate",
+15          "@type": "xsd:date"
+16      },
+17      "friends": {
+18          "@id": "foaf:knows",
+19          "@type": "@id"
+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"
+42          }
+43      }
+44    ]
+45  }
+</pre>
+
+
     </section>
 
 
@@ -1252,7 +1309,7 @@
 
   <dl>
    <dt>Changes compared to 2004 version</dt>
-   <dd>The introduction contains a number of senences from the
+   <dd>The introduction contains a number of sentences from the
    2004 document. For the rest the RDF 1.1 Primer is a completely
    new document.</dd> 
   </dl>
@@ -1262,8 +1319,8 @@
     <h2>Acknowledgments</h2>
 
     <p>Antoine Isaac provided most of the examples, including the 
-    different syntaxtic forms. Andrew Wood designed the graph
-    diagram. We are grateful for the comments procided by (in
+    different syntactic forms. Andrew Wood designed the graph
+    diagram. We are grateful for the comments provided by (in
     alphabetical order) Dan Brickley, Pierre-Antoine Champin, Pat
     Hayes and David Wood. </p>