Improve compact-0021
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sat, 08 Dec 2012 14:13:40 +0100
changeset 1000 bc5e4a37c3a9
parent 999 1371f1e9446c
child 1001 4dbe6fbe0689
Improve compact-0021

If @vocab is set to http://example.com/subdir/ and there's a term definition vocab/date then the datatype http://example.com/subdir/vocab/dateTime is compacted to vocab/date:Time which is more than surprising when debugging. Change the IRIs of the datatypes to http://example.com/subdir/vocab/types/...
test-suite/tests/compact-0021-context.jsonld
test-suite/tests/compact-0021-in.jsonld
test-suite/tests/compact-0021-out.jsonld
--- a/test-suite/tests/compact-0021-context.jsonld	Sat Dec 08 13:49:20 2012 +0100
+++ b/test-suite/tests/compact-0021-context.jsonld	Sat Dec 08 14:13:40 2012 +0100
@@ -1,6 +1,6 @@
 {
   "@context": {
     "@vocab": "http://example.com/subdir/",
-    "vocab/date": { "@type": "vocab/dateTime" }
+    "vocab/date": { "@type": "vocab/types/dateTime" }
   }
 }
--- a/test-suite/tests/compact-0021-in.jsonld	Sat Dec 08 13:49:20 2012 +0100
+++ b/test-suite/tests/compact-0021-in.jsonld	Sat Dec 08 14:13:40 2012 +0100
@@ -1,11 +1,11 @@
 [
   {
     "@id": "http://example.com/subdir/id/1",
-    "@type": [ "http://example.com/subdir/vocab/test" ],
+    "@type": [ "http://example.com/subdir/vocab/types/Test" ],
     "http://example.com/subdir/vocab/date": [
       {
         "@value": "2011-01-25T00:00:00Z",
-        "@type": "http://example.com/subdir/vocab/dateTime"
+        "@type": "http://example.com/subdir/vocab/types/dateTime"
       }
     ],
     "http://example.com/subdir/vocab/embed": [
@@ -14,7 +14,7 @@
         "http://example.com/subdir/vocab/expandedDate": [
           {
             "@value": "2012-08-01T00:00:00Z",
-            "@type": "http://example.com/subdir/vocab/dateTime"
+            "@type": "http://example.com/subdir/vocab/types/dateTime"
           }
         ]
       }
--- a/test-suite/tests/compact-0021-out.jsonld	Sat Dec 08 13:49:20 2012 +0100
+++ b/test-suite/tests/compact-0021-out.jsonld	Sat Dec 08 14:13:40 2012 +0100
@@ -1,16 +1,16 @@
 {
   "@context": {
     "@vocab": "http://example.com/subdir/",
-    "vocab/date": { "@type": "vocab/dateTime" }
+    "vocab/date": { "@type": "vocab/types/dateTime" }
   },
   "@id": "http://example.com/subdir/id/1",
-  "@type": "vocab/test",
+  "@type": "vocab/types/Test",
   "vocab/date": "2011-01-25T00:00:00Z",
   "vocab/embed": {
     "@id": "http://example.com/subdir/id/2",
     "vocab/expandedDate": {
       "@value": "2012-08-01T00:00:00Z",
-      "@type": "vocab/dateTime"
+      "@type": "vocab/types/dateTime"
     }
   }
 }