fixing JSON-LD examples
authorNandana Mihindukulasooriya <nandana.cse@gmail.com>
Mon, 14 Jul 2014 17:24:52 +0200
changeset 706 29bff9cea0a3
parent 704 0d93ea6c4021
child 707 c34cd7572f77
fixing JSON-LD examples
ldp-primer/examples/bc_after_bin.txt
ldp-primer/examples/bc_after_del.txt
ldp-primer/examples/bccreate.txt
ldp-primer/examples/bcget_res.txt
ldp-primer/examples/bug_create_req.txt
ldp-primer/examples/bug_create_s1.txt
ldp-primer/examples/bug_create_s2.txt
ldp-primer/examples/bug_delete_s1.txt
ldp-primer/examples/create_cr_req.txt
ldp-primer/examples/create_cr_s1.txt
ldp-primer/examples/foafupdate.txt
ldp-primer/examples/getbc_res.txt
ldp-primer/examples/ic_bug_create_req.txt
ldp-primer/examples/ic_bug_create_s1.txt
ldp-primer/examples/ic_product_lookup_resp.txt
ldp-primer/examples/product_lookup_resp.txt
ldp-primer/ldp-primer.html
--- a/ldp-primer/examples/bc_after_bin.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/bc_after_bin.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -8,7 +8,9 @@
 ---
   
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+  "@context": {
+    "dcterms": "http://purl.org/dc/terms/",
+    "ldp": "http://www.w3.org/ns/ldp#" },
   "@id": "http://example.org/alice/",
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Alice’s data storage on the Web",
--- a/ldp-primer/examples/bc_after_del.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/bc_after_del.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -8,7 +8,9 @@
 ---
   
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+  "@context": {
+    "dcterms": "http://purl.org/dc/terms/",
+    "ldp": "http://www.w3.org/ns/ldp#" },
   "@id": "http://example.org/alice/",
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Alice’s data storage on the Web",
--- a/ldp-primer/examples/bccreate.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/bccreate.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -21,7 +21,9 @@
 Content-Type: application/ld+json
 
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+  "@context": {
+    "dcterms": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/" },
   "@id": "",
   "@type": "foaf:PersonalProfileDocument",
   "foaf:primaryTopic": { 
--- a/ldp-primer/examples/bcget_res.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/bcget_res.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -22,7 +22,9 @@
 ETag: W/'123456789'
   
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+   "@context": {
+     "dcterms": "http://purl.org/dc/terms/",
+     "ldp": "http://www.w3.org/ns/ldp#" },
   "@id": "http://example.org/alice/",
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Alice’s data storage on the Web",
--- a/ldp-primer/examples/bug_create_req.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/bug_create_req.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -17,7 +17,9 @@
 Link: <http://www.w3.org/ns/ldp#Resource>; rel="type"
 
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+  "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "bt": "http://example.org/vocab/bugtracker#" }, 
   "@id": "",
   "@type": "bt:BugReport",
   "dcterms:title": "LDP Demo crashes when shutting down.",
--- a/ldp-primer/examples/bug_create_s1.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/bug_create_s1.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -13,18 +13,26 @@
   bt:hasbug <bug3>, <bug4>, <bug67> .
 	
 ---
-{
-  "@id": "/tracker/ldp-demo/",
-  "@type": [ "ldp:DirectContainer", "bt#Product"],
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
-  "dc:title": "Product description of LDP Demo product which is also an LDP-DC",
-  "ldp:contains": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"}],
-  "ldp:hasMemberRelation": "bt:hasbug",
-  "ldp:membershipResource": { "@id": "/tracker/ldp-demo/#it"}
-}
-{
-  "@id": "/tracker/ldp-demo/#it",
-  "@type": "bt:Product",
-  "dc:title": "LDP Demo",
-  "bt:hasbug": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"} ]
-}
\ No newline at end of file
+[
+  {
+    "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "ldp": "http://www.w3.org/ns/ldp#",
+      "bt": "http://example.org/vocab/bugtracker#" }, 
+    "@id": "/tracker/ldp-demo/",
+    "@type": [ "ldp:DirectContainer", "bt:Product"],
+    "dcterms:title": "Product description of LDP Demo product which is also an LDP-DC",
+    "ldp:contains": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"}],
+    "ldp:hasMemberRelation": { "@id": "bt:hasbug" },
+    "ldp:membershipResource": { "@id": "/tracker/ldp-demo/#it"}
+  },
+  {
+    "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "bt": "http://example.org/vocab/bugtracker#" }, 
+    "@id": "/tracker/ldp-demo/#it",
+    "@type": "bt:Product",
+    "dcterms:title": "LDP Demo",
+    "bt:hasbug": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"} ]
+  }
+]
\ No newline at end of file
--- a/ldp-primer/examples/bug_create_s2.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/bug_create_s2.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -9,7 +9,9 @@
      
 ---
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+  "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "bt": "http://example.org/vocab/bugtracker#" }, 
   "@id": "/tracker/ldp-demo/bug67",
   "dcterms:title": "Product A crashes when shutting down.",
   "dcterms:creator": { "@id": "/tracker/users/johndoe" },
--- a/ldp-primer/examples/bug_delete_s1.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/bug_delete_s1.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -13,19 +13,26 @@
   bt:hasBug <bug4>, <bug67> .
 	
 ---
-{
-  "@id": "/tracker/ldp-demo/",
-  "@type": [ "ldp:DirectContainer", "bt:Product"],
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
-  "dc:title": "Product A",
-  "ldp:contains": [{ "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"}],
-  "ldp:hasMemberRelation": "bt:hasBug",
-  "ldp:membershipResource": "#it"
-}
-{
-  "@id": "#it",
-  "@type": "bt:Product",
-  "bt:hasBug": [{ "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"} ]
-}
+[
+  {
+    "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "ldp": "http://www.w3.org/ns/ldp#",
+      "bt": "http://example.org/vocab/bugtracker#" },
+    "@id": "/tracker/ldp-demo/",
+    "@type": [ "ldp:DirectContainer", "bt:Product"],
+    "dcterms:title": "Product A",
+    "ldp:contains": [{ "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"}],
+    "ldp:hasMemberRelation": { "@id": "bt:hasbug" },
+    "ldp:membershipResource": "#it"
+  },
+  {
+    "@context": {
+      "bt": "http://example.org/vocab/bugtracker#" },
+    "@id": "#it",
+    "@type": "bt:Product",
+    "bt:hasBug": [{ "@id": "/tracker/ldp-demo/bug4"}, { "@id": "/tracker/ldp-demo/bug67"} ]
+  }
+]
 
 
--- a/ldp-primer/examples/create_cr_req.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/create_cr_req.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -19,7 +19,9 @@
 Slug: photos
 
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+  "@context": {
+    "dcterms": "http://purl.org/dc/terms/",
+    "ldp": "http://www.w3.org/ns/ldp#" },
   "@id": "",
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Photos of Alice" ,
--- a/ldp-primer/examples/create_cr_s1.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/create_cr_s1.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -8,7 +8,9 @@
 ---
 
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+  "@context": {
+    "dcterms": "http://purl.org/dc/terms/",
+    "ldp": "http://www.w3.org/ns/ldp#" },
   "@id": "http://example.org/alice/",
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
   "dcterms:title": "Alice’s data storage on the Web",
--- a/ldp-primer/examples/foafupdate.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/foafupdate.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -17,7 +17,9 @@
 ---
 
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+  "@context": {
+    "dcterms": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/" },
   "@id": "",
   "@type": "foaf:PersonalProfileDocument",
   "foaf:primaryTopic": { 
--- a/ldp-primer/examples/getbc_res.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/getbc_res.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -21,8 +21,10 @@
 ETag: W/'123456789'
 	
 {
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
+   "@context": {
+     "dcterms": "http://purl.org/dc/terms/",
+     "ldp": "http://www.w3.org/ns/ldp#" },
   "@id": "http://example.org/alice/",
   "@type": [ "ldp:Container", "ldp:BasicContainer"],
-  "dcterms:title": "Alice’s data storage on the Web",
+  "dcterms:title": "Alice’s data storage on the Web"
 }
\ No newline at end of file
--- a/ldp-primer/examples/ic_bug_create_req.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/ic_bug_create_req.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -18,15 +18,23 @@
 Host: example.org
 Content-Type: application/ld+json
 
-{
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
-  "@id": "",
-  "@type": "bt:BugReport",
-  "foaf:primaryTopic": { "@id": "#it" },
-  "dcterms:title": "Product A crashes when shutting down.",
-  "dcterms:creator": { "@id": "/tracker/ldp-demo/johndoe" }
-}
-{
+[
+  {
+    "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "ldp": "http://www.w3.org/ns/ldp#",
+      "bt": "http://example.org/vocab/bugtracker#",
+      "foaf": "http://xmlns.com/foaf/0.1/" },
+    "@id": "",
+    "@type": "bt:BugReport",
+    "foaf:primaryTopic": { "@id": "#it" },
+    "dcterms:title": "Product A crashes when shutting down.",
+    "dcterms:creator": { "@id": "/tracker/ldp-demo/johndoe" }
+  }, 
+  {
+    "@context": {
+      "bt": "http://example.org/vocab/bugtracker#" },
     "@id": "#it",
     "@type": "bt:Bug"
-}
\ No newline at end of file
+  }
+]
\ No newline at end of file
--- a/ldp-primer/examples/ic_bug_create_s1.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/ic_bug_create_s1.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -15,19 +15,28 @@
   bt:hasBug <bug3#it>, <bug4#it>, <bug67#it> .
 	
 ---
-{
-  "@id": "/tracker/ldp-demo/",
-  "@type": [ "ldp:IndirectContainer", "bt:Product"],
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
-  "dc:title": "Product description of the LDP Demo product which is also an LDP-IC",
-  "ldp:contains": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug67"}],
-  "ldp:hasMemberRelation": { "@id": "bt:hasBug" },
-  "ldp:membershipResource": { "@id": "/tracker/ldp-demo/#it" }, 
-  "ldp:insertedContentRelation": { "@id": "foaf:primaryTopic" }
-}
-{
+[
+  {
+    "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "ldp": "http://www.w3.org/ns/ldp#",
+      "bt": "http://example.org/vocab/bugtracker#",
+      "foaf": "http://xmlns.com/foaf/0.1/" },
+    "@id": "/tracker/ldp-demo/",
+    "@type": [ "ldp:IndirectContainer", "bt:Product"],
+    "dc:title": "Product description of the LDP Demo product which is also an LDP-IC",
+    "ldp:contains": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug67"}],
+    "ldp:hasMemberRelation": { "@id": "bt:hasBug" },
+    "ldp:membershipResource": { "@id": "/tracker/ldp-demo/#it" }, 
+    "ldp:insertedContentRelation": { "@id": "foaf:primaryTopic" }
+  },
+  {
+    "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "bt": "http://example.org/vocab/bugtracker#" },
     "@id": "/tracker/ldp-demo/#it",
     "@type": "bt:Product",
-    "dc:title": "LDP Demo"
+    "dcterms:title": "LDP Demo"
     "bt:hasBug": [{ "@id": "/tracker/ldp-demo/bug3#it"}, { "@id": "/tracker/ldp-demo/bug3#it"}, { "@id": "/tracker/ldp-demo/bug67#it"} ]
-}
\ No newline at end of file
+  }
+]
\ No newline at end of file
--- a/ldp-primer/examples/ic_product_lookup_resp.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/ic_product_lookup_resp.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -29,20 +29,28 @@
 Content-Length: 278
 ETag: W/"123456789"
 
-{
-  "@id": "/tracker/ldp-demo/",
-  "@type": [ "ldp:DirectContainer", "bt:Product"],
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
-  "dc:title": "Product description of LDP Demo product which is also an LDP-IC",
-  "ldp:contains": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug4"}],
-  "ldp:hasMemberRelation": "bt:hasBug",
-  "ldp:membershipResource": "#it",
-  "ldp:insertedContentRelation": "foaf:primaryTopic",
+[ 
+  {
+    "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "ldp": "http://www.w3.org/ns/ldp#",
+      "bt": "http://example.org/vocab/bugtracker#" },
+    "@id": "/tracker/ldp-demo/",
+    "@type": [ "ldp:DirectContainer", "bt:Product"],
+    "dcterms:title": "Product description of LDP Demo product which is also an LDP-IC",
+    "ldp:contains": [{ "@id": "/tracker/ldp-demo/bug3"}, { "@id": "/tracker/ldp-demo/bug4"}],
+    "ldp:hasMemberRelation": { "@id": "bt:hasbug" },
+    "ldp:membershipResource": { "@id": "#it" },
+    "ldp:insertedContentRelation": "foaf:primaryTopic"
   
-}
-{
+  },
+  {
+    "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "bt": "http://example.org/vocab/bugtracker#" },
     "@id": "#it",
     "@type": "bt:Product",
-    "dc:title": "LDP Demo",
+    "dcterms:title": "LDP Demo",
     "bt:hasbug": [{ "@id": "/tracker/ldp-demo/bug3#it"}, { "@id": "/tracker/ldp-demo/bug4#it"} ]
-}
\ No newline at end of file
+  }
+]
\ No newline at end of file
--- a/ldp-primer/examples/product_lookup_resp.txt	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/examples/product_lookup_resp.txt	Mon Jul 14 17:24:52 2014 +0200
@@ -27,18 +27,25 @@
 Content-Length: 315
 ETag: W/"123456789"
 
-{
-  "@id": "",
-  "@type": [ "ldp:DirectContainer", "bt:Product"],
-  "@context": "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-primer/context.json",
-  "dc:title": "Product description of the LDP Demo product which is also an LDP-DC",
-  "ldp:contains": [{ "@id": "bug3"}, { "@id": "bug4"}],
-  "ldp:hasMemberRelation": "bt:hasBug",
-  "ldp:membershipResource": { "@id": "#it"}
-}
-{
-    "@id": "#it",
-    "@type": "bt:Product",
-    "dc:title": "LDP Demo",
-    "bt:hasBug": [{ "@id": "bug3"}, { "@id": "bug4"} ]
-}
\ No newline at end of file
+[
+   { "@context": {
+      "dcterms": "http://purl.org/dc/terms/",
+      "ldp": "http://www.w3.org/ns/ldp#",
+      "bt": "http://example.org/vocab/bugtracker#" }, 
+      "@id": "",
+      "@type": [ "ldp:DirectContainer", "bt:Product"],
+      "dcterms:title": "Product description of the LDP Demo product which is also an LDP-DC",
+      "ldp:contains": [{ "@id": "bug3"}, { "@id": "bug4"}],
+      "ldp:hasMemberRelation": { "@id": "bt:hasBug"},
+      "ldp:membershipResource": { "@id": "#it"}
+   },
+   {
+      "@context": { "dcterms": "http://purl.org/dc/terms/",
+                    "ldp": "http://www.w3.org/ns/ldp#",
+                     "bt": "http://example.org/vocab/bugtracker#" }, 
+      "@id": "#it",
+      "@type": "bt:Product",
+      "dcterms:title": "LDP Demo",
+      "bt:hasBug": [{ "@id": "bug3"}, { "@id": "bug4"} ]
+   }
+]
\ No newline at end of file
--- a/ldp-primer/ldp-primer.html	Thu Jul 10 10:20:53 2014 +0200
+++ b/ldp-primer/ldp-primer.html	Mon Jul 14 17:24:52 2014 +0200
@@ -186,7 +186,7 @@
           title: "LDP Best Practices and Guidelines",
           href: "http://www.w3.org/2012/ldp/hg/ldp-bp/ldp-bp.html",
           authors: [
-            "Cody Burleson",
+            "Cody Burleson",
             "Miguel Esteban Gutiérrez",
             "Nandana Mihindukulasooriya"
           ],
@@ -200,8 +200,9 @@
           title: "Linked Data Platform 1.0 Test Cases",
           href: "http://www.w3.org/2012/ldp/hg/tests/ldp-testsuite.html",
           authors: [
-            "Raúl García-Castro",
-            "Fernando Serena"
+            "Raúl García-Castro",
+            "Fernando Serena",
+            "Steve Speicher"  
           ],
           status: "WD",
           deliveredBy: [
@@ -571,14 +572,10 @@
       <h2> Deleting a resource (DELETE on an LDPR) </h2> 
 
       <p>If Alice decides to delete the image, she can do that with a delete operation.</p>
-      
-      <p>Similar to the previous update operation, Alice uses the etag of the resource representation she retrieved with If-Match header to do a conditional delete to ensure that the resource state
-      was not changed since she decided to delete it. </p>
 
       <pre title="Request - deleting a RDF resource" class="example"> 
 DELETE /alice/avatar HTTP/1.1
-Host: example.org
-If-Match: W/&quot;123454322&quot;        
+Host: example.org       
    </pre> 
 
       <pre title="Response - deleting a RDF resource" class="example">