Replace some lingering uses of @iri and @subject with @id.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Tue, 24 Jan 2012 10:24:17 -0800
changeset 361 d20e6e5f136c
parent 359 a3445a892a67
child 362 67d581a6aeca
Replace some lingering uses of @iri and @subject with @id.
update "place" context to current syntax.
README.rst
contexts/place
primer/latest/index.html
primer/latest/lang-jsonld.js
spec/latest/rdf-graph-normalization/index.html
--- a/README.rst	Mon Jan 23 21:52:23 2012 +0800
+++ b/README.rst	Tue Jan 24 10:24:17 2012 -0800
@@ -19,7 +19,7 @@
 ::
  {
    "@context": "http://purl.org/jsonld/Person",
-   "@subject": "http://dbpedia.org/resource/John_Lennon",
+   "@id": "http://dbpedia.org/resource/John_Lennon",
    "name": "John Lennon",
    "birthday": "10-09",
    "member": "http://dbpedia.org/resource/The_Beatles"
--- a/contexts/place	Mon Jan 23 21:52:23 2012 +0800
+++ b/contexts/place	Tue Jan 24 10:24:17 2012 -0800
@@ -5,9 +5,21 @@
       "name": "http://purl.org/dc/terms/title",
       "description": "http://purl.org/dc/terms/description",
       "geo": "http://schema.org/geo",
-      "image": "http://schema.org/image",
-      "latitude": "http://www.w3.org/2003/01/geo/wgs84_pos#latitude",
-      "longitude": "http://www.w3.org/2003/01/geo/wgs84_pos#longitude",
+      "image":
+      {
+        "@id": "http://schema.org/image",
+        "@type": "@id"
+      },
+      "latitude":
+      {
+        "@id": "http://www.w3.org/2003/01/geo/wgs84_pos#latitude",
+        "@type": "xsd:decimal"
+      },
+      "longitude":
+      {
+        "@id": "http://www.w3.org/2003/01/geo/wgs84_pos#longitude",
+        "@type": "xsd:decimal"
+      },
       "elevation": "http://www.w3.org/2003/01/geo/wgs84_pos#altitude",
       "telephone": "http://schema.org/telephone",
       
@@ -24,14 +36,7 @@
       "feet": "http://purl.org/measurement#feet",
       "miles": "http://purl.org/measurement#miles",
       
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-      
-      "@coerce":
-      {
-         "image": "@iri",
-         "latitude": "xsd:decimal",
-         "longitude": "xsd:decimal"
-      }
+      "xsd": "http://www.w3.org/2001/XMLSchema#"
    }
 }
 
--- a/primer/latest/index.html	Mon Jan 23 21:52:23 2012 +0800
+++ b/primer/latest/index.html	Tue Jan 24 10:24:17 2012 -0800
@@ -455,16 +455,17 @@
         "Store": "http://ns.example.com/store#Store",
         "Product": "http://ns.example.com/store#Product",
         "product": "http://ns.example.com/store#product",
-        "category": "http://ns.example.com/store#category",
+        "category":
+        {
+          "@id": "http://ns.example.com/store#category",
+          "@type": "@id"
+        },
         "price": "http://ns.example.com/store#price",
         "stock": "http://ns.example.com/store#stock",
         "name": "http://purl.org/dc/terms/title",
         "description": "http://purl.org/dc/terms/description",
         "p": "http://store.example.com/products/",
-        "cat": "http://store.example.com/category/",
-        "@coerce": {
-            "@iri": "category"
-        }
+        "cat": "http://store.example.com/category/"
     }
 }
 </pre>
--- a/primer/latest/lang-jsonld.js	Mon Jan 23 21:52:23 2012 +0800
+++ b/primer/latest/lang-jsonld.js	Tue Jan 24 10:24:17 2012 -0800
@@ -55,7 +55,7 @@
     ],
     [
       // common "keywords"
-      ["lang-jsonld-keyword", /^"(@iri|@coerce|@context|@subject|@type|@vocab|@base|@literal|@language|@datatype)"\s*:/],
+      ["lang-jsonld-keyword", /^"(@id|@coerce|@context|@type|@value|@language)"\s*:/],
       // empty string
       //[PR.PR_LITERAL, /^""/],
       ["lang-jsonld-string", /^""/],
--- a/spec/latest/rdf-graph-normalization/index.html	Mon Jan 23 21:52:23 2012 +0800
+++ b/spec/latest/rdf-graph-normalization/index.html	Tue Jan 24 10:24:17 2012 -0800
@@ -565,7 +565,7 @@
   <ol class="algorithm">
     <li>If the <tref>expanded node</tref> is an unlabeled node, add a
       new key-value pair to the <tref>expanded node</tref>
-      where the key is <code>@subject</code> and the value is the
+      where the key is <code>@id</code> and the value is the
       concatenation of the <tref>labeling prefix</tref>
       and the string value of the <tref>labeling counter</tref>.
       Increment the <tref>labeling counter</tref>.</li>
@@ -587,8 +587,8 @@
         </li></ol></li>
     <li>After exiting the recursive step, replace the reference to the
       <tref>expanded node</tref> with an object containing a single
-       key-value pair where the key is <code>@iri</code> and the value is
-       the value of the <code>@subject</code> key in the node.</li>
+       key-value pair where the key is <code>@id</code> and the value is
+       the value of the <code>@id</code> key in the node.</li>
   </ol></li>
 <li>For every entry in the <tref>map of flattened nodes</tref>, insert a
   key-value pair into the <tref>node state map</tref> where the key is the
@@ -602,7 +602,7 @@
 <li>For every entry in the <tref>node state map</tref> that has a
 <tref>label</tref> that begins with <code>_:c14n</code>, relabel the node
 using the <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>.
-<li>Label all of the nodes that contain a <code>@subject</code> key associated
+<li>Label all of the nodes that contain a <code>@id</code> key associated
 with a value starting with <code>_:</code> according to the steps in the
 <a href="#deterministic-labeling-algorithm">Deterministic Labeling Algorithm</a>.
 </li>
@@ -822,7 +822,7 @@
     </ol>
   </li>
   <li>If both values are expanded IRIs, the
-    lexicographically lesser string associated with <code>@iri</code>
+    lexicographically lesser string associated with <code>@id</code>
     is first.</li>
   <li>Otherwise, the two values are equivalent.</li>
 </ol>
@@ -1258,7 +1258,7 @@
   <li>Append all properties to the <tref>label serialization</tref> by
     processing each key-value pair in the <tref>node reference</tref>,
     excluding the
-    <code>@subject</code> property. The keys should be processed in
+    <code>@id</code> property. The keys should be processed in
     lexicographical order and their associated values should be processed
     in the order produced by the
     <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>:
@@ -1270,7 +1270,7 @@
         Process all of the objects that are associated with the key, building
         an <tdef>object string</tdef> for each item:
         <ol class="algorithm">
-          <li>If the object contains an <code>@iri</code> key with a
+          <li>If the object contains an <code>@id</code> key with a
             value that starts
             with <code>_:</code>, set the <tref>object string</tref> to
             the value <code>_:</code>. If the value does not
@@ -1278,7 +1278,7 @@
             using the pattern
             <code>&lt;</code><strong>IRI</strong><code>&gt;</code>
             where <strong>IRI</strong> is the value associated with the
-            <code>@iri</code> key.</li>
+            <code>@id</code> key.</li>
           <li>If the object contains a <code>@literal</code> key and a
             <code>@datatype</code> key, build the <tref>object string</tref>
             using the pattern