fiddles
authorRoger Menday <roger.menday@uk.fujitsu.com>
Wed, 18 Jun 2014 12:00:01 +0100
changeset 674 303a464d6332
parent 673 7fe3a1c86f0b
child 675 9105412946cb
fiddles
TR/WD-ldp-primer-20140620/Overview.html
--- a/TR/WD-ldp-primer-20140620/Overview.html	Wed Jun 18 11:53:01 2014 +0100
+++ b/TR/WD-ldp-primer-20140620/Overview.html	Wed Jun 18 12:00:01 2014 +0100
@@ -632,7 +632,7 @@
 
 </pre></div><div class="jsonld" style="font-family: sans-serif; display: none;">JSON-LD:</div><div class="jsonld" style="display: none;"><pre>GET /alice/ HTTP/1.1
 Host: example.org
-Accept: application/ld+json</pre></div></pre></div> 
+Accept: application/ld+json</pre></div></div></div> 
       
       <p>As her document storage was just created, it is an empty container. </p>
 
@@ -739,7 +739,7 @@
   },
   "dcterms:title": "Alice’s FOAF file"
 }
-</pre></div></pre></div> 
+</pre></div></div></div> 
 
     
 
@@ -781,7 +781,7 @@
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Alice’s data storage on the Web",
   "ldp:contains": { "@id": "http://example.org/alice/foaf" }
-}</pre></div></pre></div></section>
+}</pre></div></div></div></section>
 
     <section id="creating-a-non-rdf-binary-resource-post-an-image-to-an-ldp-bc">
       <h3 aria-level="2" role="heading" id="h3_creating-a-non-rdf-binary-resource-post-an-image-to-an-ldp-bc"><span class="secno">2.4 </span> Creating a non-RDF (binary) resource (POST an image to an LDP-BC) </h3> 
@@ -822,7 +822,7 @@
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Alice’s data storage on the Web",
   "ldp:contains": [{ "@id": "http://example.org/alice/foaf" }, { "@id": "http://example.org/alice/avatar" } ]
-}</pre></div></pre></div> 
+}</pre></div></div></div> 
     </section>
 
     <section id="update-a-rdf-ldp-resource-put-on-an-ldp-rs">
@@ -857,7 +857,7 @@
     "foaf:img" : { "@id": "http://example.org/alice/avatar" }
   },
   "dcterms:title": "Alice’s FOAF file"
-}</pre></div></pre></div> 
+}</pre></div></div></div> 
 
       <div class="example"><div class="example-title"><span>Example 13</span>: Response - updating a RDF resource</div><div class="exxample">HTTP/1.1 204 No Content 
 Link: &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type" </pre></div>
@@ -898,7 +898,7 @@
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Alice’s data storage on the Web",
   "ldp:contains": { "@id": "http://example.org/alice/foaf" }
-}</pre></div></pre></div> 
+}</pre></div></div></div> 
      
      <p> For any subsequent request on the deleted resource, the server will respond with the appropriate HTTP response code. </p>
       <div class="example"><div class="example-title"><span>Example 17</span>: Request - after deletion</div><div class="exxample">GET /alice/avatar HTTP/1.1
@@ -931,7 +931,7 @@
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Alice’s data storage on the Web",
   "ldp:contains": { "@id": "http://example.org/alice/foaf" }
-}</pre></div></pre></div>  
+}</pre></div></div></div>  
 
       <p>To create a new container for managing photos, Alice POSTs a representation of a container (LDP-BC) to the root container. Alice express her intention that the newly created resource should be an LDP Basic Container by including a Link header in the request with the relationship 'type'. </p>
       <div class="example"><div class="example-title"><span>Example 20</span>: Request - creating a new container</div><div class="exxample"><div class="turtle" style="font-family: sans-serif;">Turtle:</div><div class="turtle"><pre>POST alice/ HTTP/1.1
@@ -959,7 +959,7 @@
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Photos of Alice" ,
   "dcterms:description": "This container will contain photos of Alice."
-}</pre></div></pre></div>  
+}</pre></div></div></div>  
       <p>If the create is successful, the server responds with location of the newly created container for the photos.</p>
       <div class="example"><div class="example-title"><span>Example 21</span>: Response - creating the new container</div><div class="exxample">HTTP/1.1 201 Created
 Location: http://example.org/alice/photos/
@@ -982,7 +982,7 @@
      { "@id": "http://example.org/alice/foaf" },
      { "@id": "http://example.org/alice/photos/" }
    ]
-}</pre></div></pre></div> 
+}</pre></div></div></div> 
       <p>and the photo container will look like the following.</p>
       <div class="example"><div class="example-title"><span>Example 23</span>: State of Alice's newly created photo container</div><div class="exxample"><div class="turtle" style="font-family: sans-serif;">Turtle:</div><div class="turtle"><pre>@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt; .
 @prefix dcterms: &lt;http://purl.org/dc/terms/&gt; .
@@ -1001,7 +1001,7 @@
 
 
 
-  </pre></div></pre></div> 
+  </pre></div></div></div> 
 
     </section> 
 
@@ -1122,7 +1122,7 @@
 
 </pre></div><div class="jsonld" style="font-family: sans-serif; display: none;">JSON-LD:</div><div class="jsonld" style="display: none;"><pre>GET /tracker/ldp-demo/ HTTP/1.1
 Host: example.org
-Accept: application/ld+json; charset=UTF-8</pre></div></pre></div>
+Accept: application/ld+json; charset=UTF-8</pre></div></div></div>
       <p>If the product resource is available, the server responds with the RDF representation of the Direct Container that corresponds to the given product using the requested media type,
         <code>text/turtle</code> or <code>application/ld+json</code> in this case.</p>
       <div class="example"><div class="example-title"><span>Example 25</span>: Response - Product Lookup</div><div class="exxample"><div class="turtle" style="font-family: sans-serif;">Turtle:</div><div class="turtle"><pre>HTTP/1.1 200 OK 
@@ -1166,7 +1166,7 @@
     "@type": "bt:Product",
     "dc:title": "LDP Demo",
     "bt:hasBug": [{ "@id": "bug3"}, { "@id": "bug4"} ]
-}</pre></div></pre></div>  
+}</pre></div></div></div>  
 
       <p>The representation of the product contains both information about the product such as the title and the bugs associated with the product and information about the product description such as the title of the product description and other properties of the LDP Container. </p>
       
@@ -1220,7 +1220,7 @@
   "@type": "bt:BugReport",
   "dcterms:title": "LDP Demo crashes when shutting down.",
   "dcterms:creator": { "@id": "http://example.org/tracker/users/johndoe" }
-}</pre></div></pre></div> 
+}</pre></div></div></div> 
       <p>If the creation is successful, the server responds with location of the newly created resource.</p>
       <div class="example"><div class="example-title"><span>Example 27</span>: A response of creating new a bug</div><pre class="example" data-oninclude="fixCode">HTTP/1.1 201 Created
 Location: http://example.org/tracker/ldp-demo/bug67
@@ -1255,7 +1255,7 @@
   "@type": "bt:Product",
   "dc:title": "LDP Demo",
   "bt:hasbug": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"} ]
-}</pre></div></pre></div>
+}</pre></div></div></div>
       <p> As you can see two new triples are added to the container. That is (&lt;/tracker/ldp-demo/&gt;, &lt;ldp:contains&gt;, &lt;/tracker/ldp-demo/bug67&gt;) and 
        (&lt;/tracker/ldp-demo/#it&gt;, &lt;bt:hasbug&gt;, &lt;/tracker/ldp-demo/bug67&gt;). The former is added in any type of container and the latter is defined by the direct 
        container properties. </p>
@@ -1279,7 +1279,7 @@
     "@value": "2013-05-05T10:00:00"
   },
   "bt:isInState": "New"
-}</pre></div></pre></div> 
+}</pre></div></div></div> 
 
     </section>
 
@@ -1326,7 +1326,7 @@
 }
 
 
-</pre></div></pre></div>
+</pre></div></div></div>
        
        <p> As seen from the LDP Direct Container representation above, both the containment triple (&lt;/tracker/ldp-demo/&gt;, ldp:contains, &lt;/tracker/ldp-demo/bug3&gt;) and the membership triple (&lt;/tracker/ldp-demo/#it&gt;, bt:hasBug, &lt;/tracker/ldp-demo/bug3&gt;) were removed from the container representation. </p>
 
@@ -1350,7 +1350,7 @@
 
 </pre></div><div class="jsonld" style="font-family: sans-serif; display: none;">JSON-LD:</div><div class="jsonld" style="display: none;"><pre>GET /tracker/ldp-demo/ HTTP/1.1
 Host: example.org
-Accept: application/ld+json; charset=UTF-8</pre></div></pre></div>
+Accept: application/ld+json; charset=UTF-8</pre></div></div></div>
       <p> As a response to the GET request, the server responds with the representation of the product description container.</p>
       <div class="example"><div class="example-title"><span>Example 34</span>: HTTP response for product lookup</div><div class="exxample"><div class="turtle" style="font-family: sans-serif;">Turtle:</div><div class="turtle"><pre>HTTP/1.1 200 OK 
 Content-Type: text/turtle; charset=UTF-8
@@ -1396,7 +1396,7 @@
     "@type": "bt:Product",
     "dc:title": "LDP Demo",
     "bt:hasbug": [{ "@id": "/tracker/ldp-demo/bug3#it"}, { "@id": "/tracker/ldp-demo/bug4#it"} ]
-}</pre></div></pre></div>  
+}</pre></div></div></div>  
       
     <p> Now the product container is a LDP Indirect container, which has one main difference: the container has an additional predicate called "ldp:insertedContentRelation". Further, the objects of the containment triples and the membership triples are not the same. While the object of the containment triple is the same (e.g. &lt;/tracker/ldp-demo/bug3&gt;, an information resource) the object of the membership triple is now  (e.g. &lt;/tracker/ldp-demo/bug3#it&gt;, a non-information resource or real world thing). This distinction is because of the ldp:insertedContentRelation definition. How this works will be explained in <a href="#creationext">the next example</a> on creating a new resource.  </p>
 
@@ -1438,7 +1438,7 @@
 {
     "@id": "#it",
     "@type": "bt:Bug"
-}</pre></div></pre></div> 
+}</pre></div></div></div> 
       <p> One thing to note is that the representation of the resource to be created contains a triple (&lt; &gt;, foaf:primaryTopic , &lt;#it&gt;). If the create request is successful, the server responds with location of the newly created resource.</p>
       <div class="example"><div class="example-title"><span>Example 36</span>: A response of creating new a bug</div><pre class="example" data-oninclude="fixCode">HTTP/1.1 201 Created
 Location: http://example.org/tracker/ldp-demo/bug67
@@ -1473,7 +1473,7 @@
     "@type": "bt:Product",
     "dc:title": "LDP Demo"
     "bt:hasBug": [{ "@id": "/tracker/ldp-demo/bug3#it"}, { "@id": "/tracker/ldp-demo/bug3#it"}, { "@id": "/tracker/ldp-demo/bug67#it"} ]
-}</pre></div></pre></div>
+}</pre></div></div></div>
       <p> As you can see, two new triples are added to the container. That is (&lt;/tracker/ldp-demo/&gt;, &lt;ldp:contains&gt;, &lt;/tracker/ldp-demo/bug67&gt;) and 
        (&lt;/tracker/ldp-demo/#it&gt;, &lt;bt:hasbug&gt;, &lt;/tracker/ldp-demo/bug67#it&gt;). </p>