Update fromRDF algorithm and test cases. Test cases now us N-Quads inputs, rather than Turtle/TriG.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Sun, 29 Apr 2012 19:33:19 -0700
changeset 584 3d8f9d7fbc3e
parent 583 0473f1e22b67
child 585 505de0499a9e
Update fromRDF algorithm and test cases. Test cases now us N-Quads inputs, rather than Turtle/TriG.
spec/latest/json-ld-api/index.html
test-suite/tests/fromRdf-0001.nq
test-suite/tests/fromRdf-0001.ttl
test-suite/tests/fromRdf-0002.nq
test-suite/tests/fromRdf-0002.ttl
test-suite/tests/fromRdf-0003.jsonld
test-suite/tests/fromRdf-0003.nq
test-suite/tests/fromRdf-0003.ttl
test-suite/tests/fromRdf-0004.jsonld
test-suite/tests/fromRdf-0004.nq
test-suite/tests/fromRdf-0004.ttl
test-suite/tests/fromRdf-0005.jsonld
test-suite/tests/fromRdf-0005.nq
test-suite/tests/fromRdf-0005.trig
test-suite/tests/fromRdf-0006.jsonld
test-suite/tests/fromRdf-0006.nq
test-suite/tests/fromRdf-0006.trig
test-suite/tests/fromRdf-0007.nq
test-suite/tests/fromRdf-0007.trig
test-suite/tests/fromRdf-manifest.jsonld
--- a/spec/latest/json-ld-api/index.html	Fri Apr 27 17:29:20 2012 -0400
+++ b/spec/latest/json-ld-api/index.html	Sun Apr 29 19:33:19 2012 -0700
@@ -2247,53 +2247,40 @@
   <p>The conversion algorithm takes a single parameter <em>input</em> in the form of an
     array of <a>Statement</a> representations.</p>
   <ol class="algorithm">
-    <li>Construct a JSON <tref>array</tref> <em>array</em> to serve as the output object.</li>
-    <li>Construct a <tref>JSON object</tref> <em>listMap</em> to map graph names and subjects to objects derived from
-      statements having a property of <code>rdf:first</code>.</li>
-    <li>Construct a <tref>JSON object</tref> <em>restMap</em> to map graph names and subjects to objects
-      derived from statements having a property of <code>rdf:rest</code>.</li>
-    <li>Construct a <tref>JSON object</tref> <em>subjectMap</em> to map graph names and subjects to
-      <tref>JSON object</tref> instances contained in <em>array</em>.</li>
+    <li id="new_graph">Construct <em>defaultGraph</em> as a <tref>JSON object</tref>
+      containing <em>subjects</em> and <em>listMap</em>,each an empty <tref>JSON object</tref>.</li>
+    <li>Construct <em>graphs</em> as a <tref>JSON object</tref> containing <em>defaultGraph</em>
+      identified by
+      an empty <tref>string</tref>.</li>
     <li>For each statement in <em>input</em>:
       <ol class="algorithm">
+        <li>Set <em>graph</em> to the entry in <em>graphs</em> identified
+          by <em>name</em>, initializing it to a new entry using the mechanism 
+          described in <a href="#new_graph">Step 1</a>.</li>
         <li>If <em>property</em> is <code>rdf:first</code>,
-          create a new entry in <em>listMap</em> with for <em>name</em> and <em>subject</em> and an array value
-          containing <em>object</em> representation and skip to the next statement.</li>
+          use the entry in <em>graph.listMap</em> indexed by <em>subject</em>, 
+          initializing it to a new <tref>JSON object</tref> if nesessary. Add 
+          the result of performing <a href="#value-expansion">Value 
+          Expansion</a> on <em>object</em> to the entry indexed by 
+          <em>first</em> and skip to the next statement.</li>
         <li>If <em>property</em> is <code>rdf:rest</code>,
-          and <em>object</em> is a <a>BlankNode</a>,
-          create a new entry in <em>restMap</em> to map <em>name</em> and <em>subject</em> to a value being the
-          result of <a href="#iri-expansion">IRI expansion</a> on <em>object</em> and skip to the next statement.</li>
-        <li>If <em>name</em> is not <tref>null</tref>:
-          <ol class="algorithm">
-            <li>If <em>subjectMap</em> does not have an entry for <tref>null</tref> as name and <em>name</em> as subject:
-              <ol class="algorithm">
-                <li>Create a new <tref>JSON object</tref> with key/value pair of <code>@id</code> and
-                  a string representation of <em>name</em> and use as <em>value</em>.</li>
-                <li>Save <em>value</em> in <em>subjectMap</em> and append to <em>array</em>.</li>
-              </ol>
-            </li>
-            <li>Otherwise, use that entry as <em>value</em>.</li>
-            <li>If <em>value</em> does not have an entry for <code>@graph</code>, initialize it as a new <tref>array</tref> <em>ary</em>.</li>
-            <li>Otherwise, let <em>ary</em> be that array.</li>
-            <li>If <em>subjectMap</em> does not have an entry for <code>name</code> and <em>subject</em>:
-              <ol class="algorithm">
-                <li>Create a new <tref>JSON object</tref> with key/value pair of <code>@id</code> and
-                  a string representation of <em>subject</em> and use as <em>value</em>.</li>
-                <li>Save <em>value</em> in <em>subjectMap</em> and append to <em>ary</em>.</li>
-              </ol>
-            </li>
-            <li>Otherwise, use that entry as <em>value</em>.</li>
-          </ol>
-        </li>
-        <li>Otherwise, if <em>subjectMap</em> does not have an entry for <tref>null</tref> as name and <em>subject</em>:
-          <ol class="algorithm">
-            <li>Create a new <tref>JSON object</tref> with key/value pair of <code>@id</code> and
-              a string representation of <em>subject</em> and use as <em>value</em>.</li>
-            <li>Save <em>value</em> in <em>subjectMap</em> and append to <em>array</em>.</li>
-          </ol>
-        </li>
-        <li>Otherwise, use that entry as <em>value</em>.</li>
-        <li>If <em>property</em> is <code>rdf:type</code>:
+          and <em>object</em> is a <a>BlankNode</a>, use the entry in 
+          <em>graph.listMap</em> indexed by <em>subject</em>, initializing it 
+          to a new <tref>JSON object</tref> if nesessary. Add result of 
+          performing <a href="#iri-expansion">IRI expansion</a> on 
+          <em>object</em> to the entry indexed by <em>rest</em> and skip to the 
+          next statement.</li>
+        <li>If <em>name</em> is not <tref>null</tref>, and <em>defaultGraph.subjects</em>
+          does not contain an entry for <em>name</em>,
+          create a new entry for <em>name</em> from a new
+          <tref>JSON object</tref> with key/value pair of <code>@id</code> and
+          a string representation of <em>name</em>.</li>
+        <li>Set <em>value</em> as the entry from <em>graph.subjects</em> for
+          <em>subject</em>, initializing it to a new
+          <tref>JSON object</tref> with key/value pair of <code>@id</code> and
+          a string representation of <em>subject</em> if necessary.</li>
+        <li>If <em>property</em> is <code>rdf:type</code> and the <em>notType</em>
+          option is present and not <tref>true</tref>:
           <ol class="algorithm">
             <li>Append the string representation of <em>object</em> to the array value for the
               key <code>@type</code>, creating an entry in <em>value</em> if necessary.</li>
@@ -2302,8 +2289,8 @@
         <li>Otherwise, if <em>object</em> is <code>rdf:nil</code>:
           <ol class="algorithm">
             <li>Let <em>key</em> be the string representation of <em>property</em>.</li>
-            <li>Set the value for <em>key</em> in <em>value</em> to an empty <code>@list</code>
-              representation: <code>{"@list": []}</code>.</li>
+            <li>Append an empty <code>@list</code> representation to the array value for
+              <em>key</em>, creating an entry in <em>value</em> if necessary.</li>
           </ol>
         </li>
         <li>Otherwise,
@@ -2312,27 +2299,46 @@
               <em>object representation</em>
               be <em>object</em> represented in expanded form as described in
               <a href="#value-expansion">Value Expansion</a>.</li>
+            <li>If <em>object</em> is a <a>BlankNode</a>,
+              use the entry in <em>graph.listMap</em> indexed by <em>object</em>, 
+              initializing it to a new <tref>JSON object</tref> if nesessary.
+              Add an entry for <em>head</em> with <em>object representation</em>.</li>
             <li>Append <em>object representation</em> to the array value for
               <em>key</em>, creating an entry in <em>value</em> if necessary.</li>
           </ol>
         </li>
       </ol>
     </li>
-    <li>For each <em>name</em>, <em>map</em> in <em>restMap</em>:
+    <li>For each <em>name</em> and <em>graph</em> in <em>graphs</em>:
       <ol class="algorithm">
-        <li>For each key/value <em>prev</em>, <em>rest</em> entry in <em>map</em>,
-          append to the <em>listMap</em> value identified
-          by <em>name</em> and <em>prev</em> the <em>listMap</em> value identified by <em>name</em> and <em>rest</em>.</li>
+        <li>For each <em>subject</em> and <em>entry</em> in <em>graph</em>
+          where <em>entry</em> has both <em>head</em> and <em>first</em>keys:
+          <ol class="algorithm">
+            <li>Set <em>value</em> to the value of <em>head</em> in <em>entry</em>.</li>
+            <li>Remove the entry for <code>@id</code> in <em>entry</em>.</li>
+            <li>Add an entry for <code>@list</code> initialized to a new array containing
+              the value of <em>first</em> from <em>entry</em>.</li>
+            <li>While <em>entry</em> has a key for <em>rest</em>:
+              <ol class="algorithm">
+                <li>Set <em>entry</em> to the value of <em>graph.listMap</em> for <em>entry.rest</em>.</li>
+                <li>Add the value for <em>entry.first</em> to the list array.</li>
+              </ol>
+            </li>
+          </ol>
+        </li>
       </ol>
     </li>
-    <li>For each <em>name</em>, <em>map</em> in <em>listMap</em>:
+    <li>Create <em>array</em> as an empty <tref>array</tref>.</li>
+    <li>For each <em>subject</em> and <em>entry</em> in <em>defaultGraph.subjects</em>
+      ordered by <em>subject</em>:
       <ol class="algorithm">
-        <li>For each key/value <em>node</em>, <em>list</em>, in <em>map</em> where <em>list</em>
-          exists as a value of an object in <em>array</em>,
-          replace the object value with <em>list</em>.</li>
+        <li>Add <em>entry</em> to <em>array</em>.</li>
+        <li>If <em>graphs</em> has an entry for <em>subject</em>, add a property
+          <code>@graph</code> in <em>entry</em> containing the ordered entries
+          from <em>graphs[subject].subjects</em>.</li>
       </ol>
     </li>
-    <li>Return array as the graph representation in expanded form.</li>
+    <li>Return <em>array</em> as the result.</li>
   </ol>
 </section>
 </section>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0001.nq	Sun Apr 29 19:33:19 2012 -0700
@@ -0,0 +1,5 @@
+<http://example.com/Subj1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Type> .
+<http://example.com/Subj1> <http://example.com/prop1> <http://example.com/Obj1> .
+<http://example.com/Subj1> <http://example.com/prop2> "Plain" .
+<http://example.com/Subj1> <http://example.com/prop2> "2012-05-12"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Subj1> <http://example.com/prop2> "English"@en .
--- a/test-suite/tests/fromRdf-0001.ttl	Fri Apr 27 17:29:20 2012 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix ex: <http://example.com/> .
-
-ex:Subj1 a ex:Type;
-  ex:prop1 ex:Obj1;
-  ex:prop2 "Plain", "2012-05-12"^^xsd:date, "English"@en .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0002.nq	Sun Apr 29 19:33:19 2012 -0700
@@ -0,0 +1,5 @@
+<http://example.com/Subj1> <http://example.com/prop> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Subj1> <http://example.com/prop> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Subj1> <http://example.com/prop> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Subj1> <http://example.com/prop> "1.1"^^<http://www.w3.org/2001/XMLSchema#decimal> .
+<http://example.com/Subj1> <http://example.com/prop> "1.1E1"^^<http://www.w3.org/2001/XMLSchema#double> .
--- a/test-suite/tests/fromRdf-0002.ttl	Fri Apr 27 17:29:20 2012 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix ex: <http://example.com/> .
-
-ex:Subj1 ex:prop true, false, 1, 1.1, 1.1E1 .
--- a/test-suite/tests/fromRdf-0003.jsonld	Fri Apr 27 17:29:20 2012 -0400
+++ b/test-suite/tests/fromRdf-0003.jsonld	Sun Apr 29 19:33:19 2012 -0700
@@ -1,17 +1,17 @@
 [
   {
+    "@id": "_:a",
+    "@type": ["http://example.com/SubType"]
+  },
+  {
     "@id": "http://example.com/Subj1",
     "@type": ["http://example.com/Type"],
     "http://example.com/ref": [
-      {"@id": "_:t0"},
+      {"@id": "_:a"},
       {"@id": "http://example.com/Subj2"}
     ]
   },
   {
-    "@id": "_:t0",
-    "@type": ["http://example.com/SubType"]
-  },
-  {
     "@id": "http://example.com/Subj2",
     "@type": ["http://example.com/Type"],
     "http://example.com/ref": [{"@id": "http://example.com/Subj1"}]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0003.nq	Sun Apr 29 19:33:19 2012 -0700
@@ -0,0 +1,6 @@
+<http://example.com/Subj1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Type> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/SubType> .
+<http://example.com/Subj1> <http://example.com/ref> _:a .
+<http://example.com/Subj1> <http://example.com/ref> <http://example.com/Subj2> .
+<http://example.com/Subj2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Type> .
+<http://example.com/Subj2> <http://example.com/ref> <http://example.com/Subj1> .
--- a/test-suite/tests/fromRdf-0003.ttl	Fri Apr 27 17:29:20 2012 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix ex: <http://example.com/> .
-
-ex:Subj1 a ex:Type;
-  ex:ref [ a ex:SubType], ex:Subj2 .
-
-ex:Subj2 a ex:Type;
-  ex:ref ex:Subj1 .
\ No newline at end of file
--- a/test-suite/tests/fromRdf-0004.jsonld	Fri Apr 27 17:29:20 2012 -0400
+++ b/test-suite/tests/fromRdf-0004.jsonld	Sun Apr 29 19:33:19 2012 -0700
@@ -1,16 +1,16 @@
 [{
   "@id": "http://example.com/Subj1",
   "@type": ["http://example.com/Type"],
-  "http://example.com/literalList": {
+  "http://example.com/literalList": [{
     "@list": [
       {"@value": "apple"},
       {"@value": "bananna"}
     ]
-  },
-  "http://example.com/emptyList": {
+  }],
+  "http://example.com/emptyList": [{
     "@list": []
-  },
-  "http://example.com/iriList": {
+  }],
+  "http://example.com/iriList": [{
     "@list": [{"@id": "http://example.com/iri"}]
-  }
+  }]
 }]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0004.nq	Sun Apr 29 19:33:19 2012 -0700
@@ -0,0 +1,10 @@
+<http://example.com/Subj1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Type> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "bananna" .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Subj1> <http://example.com/literalList> _:a .
+<http://example.com/Subj1> <http://example.com/emptyList> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/iri> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Subj1> <http://example.com/iriList> _:c .
--- a/test-suite/tests/fromRdf-0004.ttl	Fri Apr 27 17:29:20 2012 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix ex: <http://example.com/> .
-
-ex:Subj1 a ex:Type;
-  ex:literalList ("apple" "bananna");
-  ex:emptyList ();
-  ex:iriList (<http://example.com/iri>) .
--- a/test-suite/tests/fromRdf-0005.jsonld	Fri Apr 27 17:29:20 2012 -0400
+++ b/test-suite/tests/fromRdf-0005.jsonld	Sun Apr 29 19:33:19 2012 -0700
@@ -5,12 +5,12 @@
       "@id": "http://example.com/Subj1",
       "@type": ["http://example.com/Type"],
       "http://example.com/ref": [{"@id": "http://example.com/U"}],
-      "http://example.com/list": {
+      "http://example.com/list": [{
         "@list": [
           {"@value": "a"},
           {"@value": "b"}
         ]
-      }
+      }]
     }
   ],
   "@type": ["http://example.com/Graph"],
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0005.nq	Sun Apr 29 19:33:19 2012 -0700
@@ -0,0 +1,9 @@
+<http://example.com/Subj1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Type> <http://example.com/U> .
+<http://example.com/Subj1> <http://example.com/ref> <http://example.com/U> <http://example.com/U> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" <http://example.com/U> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b <http://example.com/U> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" <http://example.com/U> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/U> .
+<http://example.com/Subj1> <http://example.com/list> _:a <http://example.com/U> .
+<http://example.com/U> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Graph> .
+<http://example.com/U> <http://example.com/name> "Graph" .
--- a/test-suite/tests/fromRdf-0005.trig	Fri Apr 27 17:29:20 2012 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix ex: <http://example.com/> .
-
-ex:U {
-  ex:Subj1 a ex:Type;
-    ex:ref ex:U;
-    ex:list ("a" "b") .
-}
-
-{
-  ex:U a ex:Graph;
-    ex:name "Graph" .
-}
--- a/test-suite/tests/fromRdf-0006.jsonld	Fri Apr 27 17:29:20 2012 -0400
+++ b/test-suite/tests/fromRdf-0006.jsonld	Sun Apr 29 19:33:19 2012 -0700
@@ -6,12 +6,12 @@
         "@id": "http://example.com/Subj1",
         "@type": ["http://example.com/Type"],
         "http://example.com/ref": [{"@id": "http://example.com/U"}],
-        "http://example.com/list": {
+        "http://example.com/list": [{
           "@list": [
             {"@value": "a"},
             {"@value": "b"}
           ]
-        }
+        }]
       }
     ]
   },
@@ -22,12 +22,12 @@
         "@id": "http://example.com/Subj1",
         "@type": ["http://example.com/Type2"],
         "http://example.com/ref": [{"@id": "http://example.com/V"}],
-        "http://example.com/list": {
+        "http://example.com/list": [{
           "@list": [
             {"@value": "c"},
             {"@value": "d"}
           ]
-        }
+        }]
       }
     ]
   }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0006.nq	Sun Apr 29 19:33:19 2012 -0700
@@ -0,0 +1,14 @@
+<http://example.com/Subj1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Type> <http://example.com/U> .
+<http://example.com/Subj1> <http://example.com/ref> <http://example.com/U> <http://example.com/U> .
+<http://example.com/Subj1> <http://example.com/list> _:a <http://example.com/U> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" <http://example.com/U> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b <http://example.com/U> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" <http://example.com/U> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/U> .
+<http://example.com/Subj1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Type2> <http://example.com/V> .
+<http://example.com/Subj1> <http://example.com/ref> <http://example.com/V> <http://example.com/V> .
+<http://example.com/Subj1> <http://example.com/list> _:c <http://example.com/V> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" <http://example.com/V> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:d <http://example.com/V> .
+_:d <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" <http://example.com/V> .
+_:d <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/V> .
--- a/test-suite/tests/fromRdf-0006.trig	Fri Apr 27 17:29:20 2012 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix ex: <http://example.com/> .
-
-ex:U {
-  ex:Subj1 a ex:Type;
-    ex:ref ex:U;
-    ex:list ("a" "b") .
-}
-
-ex:V {
-  ex:Subj1 a ex:Type2;
-    ex:ref ex:V;
-    ex:list ("c" "d") .
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0007.nq	Sun Apr 29 19:33:19 2012 -0700
@@ -0,0 +1,5 @@
+<http://data.wikipedia.org/snaks/Assertions> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.wikipedia.org/vocab#SnakSet> .
+<http://data.wikipedia.org/snaks/Assertions> <http://data.wikipedia.org/vocab#assertedBy> "http://gregkellogg.net/foaf#me" .
+<http://data.wikipedia.org/snaks/BerlinFact> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.wikipedia.org/vocab#Snak> <http://data.wikipedia.org/snaks/Assertions> .
+<http://data.wikipedia.org/snaks/BerlinFact> <http://data.wikipedia.org/vocab#assertedBy> "http://www.statistik-berlin-brandenburg.de/" <http://data.wikipedia.org/snaks/Assertions> .
+<http://en.wikipedia.org/wiki/Berlin> <http://data.wikipedia.org/vocab#population> "3499879"^^<http://www.w3.org/2001/XMLSchema#integer> <http://data.wikipedia.org/snaks/BerlinFact> .
--- a/test-suite/tests/fromRdf-0007.trig	Fri Apr 27 17:29:20 2012 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-@prefix wd: <http://data.wikipedia.org/vocab#> .
-@prefix wp: <http://en.wikipedia.org/wiki/> .
-@prefix ws: <http://data.wikipedia.org/snaks/> .
-
-# Default graph, stating assertions on IRIs not in a named graph
-{
-  ws:Assertions a wd:SnakSet;
-     wd:assertedBy "http://gregkellogg.net/foaf#me" .
-}
-
-# Assertions graph, stating assertions on IRIs also used as graph names
-ws:Assertions {
-  ws:BerlinFact a wd:Snak;
-     wd:assertedBy "http://www.statistik-berlin-brandenburg.de/" .
-}
-
-# The inner named graph, stating an assertion
-ws:BerlinFact {
-  wp:Berlin wd:population 3499879 .
-}
--- a/test-suite/tests/fromRdf-manifest.jsonld	Fri Apr 27 17:29:20 2012 -0400
+++ b/test-suite/tests/fromRdf-manifest.jsonld	Sun Apr 29 19:33:19 2012 -0700
@@ -9,43 +9,43 @@
       "@type": ["test:TestCase", "jld:FromRDFTest"],
       "name": "Object Lists",
       "purpose": "Tests generation using different types of objects.",
-      "input": "fromRdf-0001.ttl",
+      "input": "fromRdf-0001.nq",
       "expect": "fromRdf-0001.jsonld"
     }, {
       "@type": ["test:TestCase", "jld:FromRDFTest"],
       "name": "Native Types",
       "purpose": "Use native datatypes, where possible.",
-      "input": "fromRdf-0002.ttl",
+      "input": "fromRdf-0002.nq",
       "expect": "fromRdf-0002.jsonld"
     }, {
       "@type": ["test:TestCase", "jld:FromRDFTest"],
       "name": "BNodes and references",
       "purpose": "BNode name generation and references between resources.",
-      "input": "fromRdf-0003.ttl",
+      "input": "fromRdf-0003.nq",
       "expect": "fromRdf-0003.jsonld"
     }, {
       "@type": ["test:TestCase", "jld:FromRDFTest"],
       "name": "Lists",
       "purpose": "Multiple lists with different types of element.",
-      "input": "fromRdf-0004.ttl",
+      "input": "fromRdf-0004.nq",
       "expect": "fromRdf-0004.jsonld"
     }, {
       "@type": ["test:TestCase", "jld:FromRDFTest"],
       "name": "TriG document with list",
       "purpose": "Uses a named graph containing a list.",
-      "input": "fromRdf-0005.trig",
+      "input": "fromRdf-0005.nq",
       "expect": "fromRdf-0005.jsonld"
     }, {
       "@type": ["test:TestCase", "jld:FromRDFTest"],
       "name": "TriG with two graphs having same subject but different values",
       "purpose": "Ensure that properties and list elements aren't confused between graphs.",
-      "input": "fromRdf-0006.trig",
+      "input": "fromRdf-0006.nq",
       "expect": "fromRdf-0006.jsonld"
     }, {
       "@type": ["test:TestCase", "jld:FromRDFTest"],
       "name": "TriG graph with multiple named graphs",
       "purpose": "Testing @graph recursion.",
-      "input": "fromRdf-0007.trig",
+      "input": "fromRdf-0007.nq",
       "expect": "fromRdf-0007.jsonld"
     }
   ]