Update compact tests to use new syntax, add some new tests.
--- a/test-suite/context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -9,9 +9,10 @@
"expect": {"@id": "test:informationResourceResults", "@type": "@id"},
"frame": {"@id": "test:input", "@type": "@id"},
"input": {"@id": "test:informationResourceInput", "@type": "@id"},
+ "optimize": {"@id": "test:input", "@type": "@id"},
"name": "dc:title",
"purpose": "test:purpose",
"sequence": {"@id": "jld:sequence", "@type": "@id", "@list": true},
"sparql": {"@id": "test:expectedResults", "@type": "@id"}
}
-}
\ No newline at end of file
+}
--- a/test-suite/tests/compact-0001-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0001-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,13 +1,3 @@
{
- "@context": {
- "dc": "http://purl.org/dc/elements/1.1/",
- "ex": "http://example.org/vocab#",
- "ex:authored": {
- "@type": "@id"
- },
- "ex:contains": {
- "@type": "@id"
- },
- "foaf": "http://xmlns.com/foaf/0.1/"
- }
+ "@context": {}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0001-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0001-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,27 +1,1 @@
-{
- "@id": [
- {
- "@id": "http://example.org/test#chapter",
- "http://purl.org/dc/elements/1.1/description": "Fun",
- "http://purl.org/dc/elements/1.1/title": "Chapter One"
- },
- {
- "@id": "http://example.org/test#jane",
- "http://example.org/vocab#authored": "http://example.org/test#chapter",
- "http://xmlns.com/foaf/0.1/name": "Jane"
- },
- {
- "@id": "http://example.org/test#john",
- "http://xmlns.com/foaf/0.1/name": "John"
- },
- {
- "@id": "http://example.org/test#library",
- "http://example.org/vocab#contains": {
- "@id": "http://example.org/test#book",
- "http://example.org/vocab#contains": "http://example.org/test#chapter",
- "http://purl.org/dc/elements/1.1/contributor": "Writer",
- "http://purl.org/dc/elements/1.1/title": "My Book"
- }
- }
- ]
-}
\ No newline at end of file
+{"@id": "http://example.org/test#example"}
\ No newline at end of file
--- a/test-suite/tests/compact-0001-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0001-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,38 +1,1 @@
-{
- "@context": {
- "dc": "http://purl.org/dc/elements/1.1/",
- "ex": "http://example.org/vocab#",
- "ex:authored": {
- "@type": "@id"
- },
- "ex:contains": {
- "@type": "@id"
- },
- "foaf": "http://xmlns.com/foaf/0.1/"
- },
- "@id": [
- {
- "@id": "http://example.org/test#chapter",
- "dc:description": "Fun",
- "dc:title": "Chapter One"
- },
- {
- "@id": "http://example.org/test#jane",
- "ex:authored": "http://example.org/test#chapter",
- "foaf:name": "Jane"
- },
- {
- "@id": "http://example.org/test#john",
- "foaf:name": "John"
- },
- {
- "@id": "http://example.org/test#library",
- "ex:contains": {
- "@id": "http://example.org/test#book",
- "dc:contributor": "Writer",
- "dc:title": "My Book",
- "ex:contains": "http://example.org/test#chapter"
- }
- }
- ]
-}
\ No newline at end of file
+{"@id": "http://example.org/test#example"}
\ No newline at end of file
--- a/test-suite/tests/compact-0002-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0002-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,6 +1,12 @@
{
"@context": {
- "dc": "http://purl.org/dc/terms/",
- "ex": "http://example.org/test#"
+ "id1": "http://example.com/id1",
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term1",
+ "term2": "http://example.com/term2",
+ "term3": "http://example.com/term3",
+ "term4": "http://example.com/term4",
+ "term5": "http://example.com/term5"
}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0002-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0002-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,4 +1,9 @@
-{
- "@id": "http://example.org/test#thing",
- "http://purl.org/dc/terms/title": "Title"
-}
\ No newline at end of file
+[{
+ "@id": "http://example.com/id1",
+ "@type": ["http://example.com/t1"],
+ "http://example.com/term1": ["v1"],
+ "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
+ "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
+ "http://example.com/term4": [4],
+ "http://example.com/term5": [50, 51]
+}]
\ No newline at end of file
--- a/test-suite/tests/compact-0002-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0002-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,8 +1,19 @@
{
"@context": {
- "dc": "http://purl.org/dc/terms/",
- "ex": "http://example.org/test#"
+ "id1": "http://example.com/id1",
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term1",
+ "term2": "http://example.com/term2",
+ "term3": "http://example.com/term3",
+ "term4": "http://example.com/term4",
+ "term5": "http://example.com/term5"
},
- "@id": "ex:thing",
- "dc:title": "Title"
+ "@id": "id1",
+ "@type": "t1",
+ "term1": "v1",
+ "term2": {"@value": "v2", "@type": "t2"},
+ "term3": {"@value": "v3", "@language": "en"},
+ "term4": 4,
+ "term5": [50, 51]
}
\ No newline at end of file
--- a/test-suite/tests/compact-0003-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0003-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,9 +1,3 @@
{
- "@context": {
- "dc": "http://purl.org/dc/elements/1.1/",
- "ex": "http://example.org/vocab#",
- "ex:contains": {
- "@type": "@id"
- }
- }
+ "@context": {}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0003-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0003-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,7 +1,12 @@
{
- "@id": "http://example.org/test#book",
- "http://example.org/vocab#contains": {
- "@id": "http://example.org/test#chapter"
- },
- "http://purl.org/dc/elements/1.1/title": "Title"
+ "@id": "http://example.org/id",
+ "http://example.org/property": null,
+ "regularJson": {
+ "nonJsonLd": "property",
+ "deep": [{
+ "foo": "bar"
+ }, {
+ "bar": "foo"
+ }]
+ }
}
\ No newline at end of file
--- a/test-suite/tests/compact-0003-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0003-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,12 +1,3 @@
{
- "@context": {
- "dc": "http://purl.org/dc/elements/1.1/",
- "ex": "http://example.org/vocab#",
- "ex:contains": {
- "@type": "@id"
- }
- },
- "@id": "http://example.org/test#book",
- "dc:title": "Title",
- "ex:contains": "http://example.org/test#chapter"
+ "@id": "http://example.org/id"
}
\ No newline at end of file
--- a/test-suite/tests/compact-0004-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0004-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,9 +1,7 @@
{
"@context": {
- "ex": "http://example.org/test#",
- "ex:int": {
- "@type": "xsd:integer"
- },
- "xsd": "http://www.w3.org/2001/XMLSchema#"
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set"},
+ "myset3": {"@id": "http://example.com/myset3", "@container": "@set"}
}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0004-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0004-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,7 +1,12 @@
{
- "@id": "http://example.org/test",
- "http://example.org/test#int": {
- "@value": "123",
- "@type": "http://www.w3.org/2001/XMLSchema#integer"
- }
+ "@id": "http://example.org/id",
+ "http://example.com/mylist1": {"@list": []},
+ "http://example.com/myset2": {"@set": []},
+ "http://example.com/myset3": "v1",
+ "http://example.org/list1": {"@list": []},
+ "http://example.org/list2": {"@list": [null]},
+ "http://example.org/set1": {"@set": []},
+ "http://example.org/set1": {"@set": [null]},
+ "http://example.org/set3": [],
+ "http://example.org/set4": [null]
}
\ No newline at end of file
--- a/test-suite/tests/compact-0004-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0004-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,11 +1,17 @@
{
"@context": {
- "ex": "http://example.org/test#",
- "ex:int": {
- "@type": "xsd:integer"
- },
- "xsd": "http://www.w3.org/2001/XMLSchema#"
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set"},
+ "myset3": {"@id": "http://example.com/myset3", "@container": "@set"}
},
- "@id": "http://example.org/test",
- "ex:int": 123
+ "@id": "http://example.org/id",
+ "mylist1": [],
+ "myset2": [],
+ "myset3": ["v1"],
+ "http://example.org/list1": {"@list": []},
+ "http://example.org/list2": {"@list": []},
+ "http://example.org/set1": [],
+ "http://example.org/set1": [],
+ "http://example.org/set3": [],
+ "http://example.org/set4": []
}
\ No newline at end of file
--- a/test-suite/tests/compact-0005-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0005-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,12 +1,7 @@
{
"@context": {
- "ex": "http://example.org/vocab#",
- "ex:date": {
- "@type": "xsd:dateTime"
- },
- "ex:parent": {
- "@type": "@id"
- },
- "xsd": "http://www.w3.org/2001/XMLSchema#"
+ "ex": "http://example.org/",
+ "term1": {"@id": "ex:term1", "@type": "ex:datatype"},
+ "term2": {"@id": "ex:term2", "@type": "@id"}
}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0005-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0005-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,13 +1,6 @@
{
- "@id": "http://example.org/test#example1",
- "http://example.org/vocab#date": {
- "@value": "2011-01-25T00:00:00Z",
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
- },
- "http://example.org/vocab#embed": {
- "@id": "http://example.org/test#example2",
- "http://example.org/vocab#parent": {
- "@id": "http://example.org/test#example1"
- }
- }
+ "@id": "http://example.org/id1",
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"],
+ "http://example.org/term1": {"@value": "v1", "@type": "http://example.org/datatype"},
+ "http://example.org/term2": {"@id": "http://example.org/id2"}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0005-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0005-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,18 +1,11 @@
{
"@context": {
- "ex": "http://example.org/vocab#",
- "ex:date": {
- "@type": "xsd:dateTime"
- },
- "ex:parent": {
- "@type": "@id"
- },
- "xsd": "http://www.w3.org/2001/XMLSchema#"
+ "ex": "http://example.org/",
+ "term1": {"@id": "ex:term1", "@type": "ex:datatype"},
+ "term2": {"@id": "ex:term2", "@type": "@id"}
},
- "@id": "http://example.org/test#example1",
- "ex:date": "2011-01-25T00:00:00Z",
- "ex:embed": {
- "@id": "http://example.org/test#example2",
- "ex:parent": "http://example.org/test#example1"
- }
+ "@id": "ex:id1",
+ "@type": ["ex:Type1", "ex:Type2"],
+ "term1": "v1",
+ "term2": "ex:id2"
}
\ No newline at end of file
--- a/test-suite/tests/compact-0006-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0006-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,5 +1,7 @@
{
"@context": {
- "ex": "http://example.org/vocab#"
+ "ex": "http://example.org/",
+ "term1": "ex:term1",
+ "term2": "ex:term2"
}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0006-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0006-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,19 +1,6 @@
{
- "@id": "http://example.org/test",
- "http://example.org/vocab#bool": {
- "@value": "true",
- "@type": "http://www.w3.org/2001/XMLSchema#boolean"
- },
- "http://example.org/vocab#double": {
- "@value": "1.230000e+00",
- "@type": "http://www.w3.org/2001/XMLSchema#double"
- },
- "http://example.org/vocab#double-zero": {
- "@value": "0.000000e+00",
- "@type": "http://www.w3.org/2001/XMLSchema#double"
- },
- "http://example.org/vocab#int": {
- "@value": "123",
- "@type": "http://www.w3.org/2001/XMLSchema#integer"
- }
+ "@id": "http://example.org/id1",
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"],
+ "http://example.org/term1": {"@value": "v1", "@type": "http://example.org/datatype"},
+ "http://example.org/term2": {"@id": "http://example.org/id2"}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0006-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0006-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,10 +1,14 @@
{
- "@context": {
- "ex": "http://example.org/vocab#"
- },
- "@id": "http://example.org/test",
- "ex:bool": true,
- "ex:double": 1.23,
- "ex:double-zero": 0,
- "ex:int": 123
+ "@context": [{
+ "ex": "http://example.org/",
+ "term1": "ex:term1",
+ "term2": "ex:term2"
+ }, {
+ "term1": {"@type": "ex:datatype"},
+ "term2": {"@type": "@id"}
+ }],
+ "@id": "ex:id1",
+ "@type": ["ex:Type1", "ex:Type2"],
+ "term1": "v1",
+ "term2": "ex:id2"
}
\ No newline at end of file
--- a/test-suite/tests/compact-0007-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0007-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,15 +1,9 @@
{
"@context": {
+ "dc": "http://purl.org/dc/elements/1.1/",
"ex": "http://example.org/vocab#",
- "ex:bool": {
- "@type": "xsd:boolean"
- },
- "ex:double": {
- "@type": "xsd:double"
- },
- "ex:int": {
- "@type": "xsd:integer"
- },
- "xsd": "http://www.w3.org/2001/XMLSchema#"
+ "ex:authored": {"@type": "@id"},
+ "ex:contains": {"@type": "@id"},
+ "foaf": "http://xmlns.com/foaf/0.1/"
}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0007-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0007-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,19 +1,27 @@
{
- "@id": "http://example.org/test",
- "http://example.org/vocab#bool": {
- "@value": "true",
- "@type": "http://www.w3.org/2001/XMLSchema#boolean"
- },
- "http://example.org/vocab#double": {
- "@value": "1.230000e+00",
- "@type": "http://www.w3.org/2001/XMLSchema#double"
- },
- "http://example.org/vocab#double-zero": {
- "@value": "0.000000e+00",
- "@type": "http://www.w3.org/2001/XMLSchema#double"
- },
- "http://example.org/vocab#int": {
- "@value": "123",
- "@type": "http://www.w3.org/2001/XMLSchema#integer"
- }
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter",
+ "http://purl.org/dc/elements/1.1/description": ["Fun"],
+ "http://purl.org/dc/elements/1.1/title": ["Chapter One"]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": ["http://example.org/test#chapter"],
+ "http://xmlns.com/foaf/0.1/name": ["Jane"]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": ["John"]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": ["http://example.org/test#chapter"],
+ "http://purl.org/dc/elements/1.1/contributor": ["Writer"],
+ "http://purl.org/dc/elements/1.1/title": ["My Book"]
+ }]
+ }
+ ]
}
\ No newline at end of file
--- a/test-suite/tests/compact-0007-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0007-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,20 +1,34 @@
{
"@context": {
+ "dc": "http://purl.org/dc/elements/1.1/",
"ex": "http://example.org/vocab#",
- "ex:bool": {
- "@type": "xsd:boolean"
- },
- "ex:double": {
- "@type": "xsd:double"
+ "ex:authored": {"@type": "@id"},
+ "ex:contains": {"@type": "@id"},
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter",
+ "dc:description": "Fun",
+ "dc:title": "Chapter One"
},
- "ex:int": {
- "@type": "xsd:integer"
+ {
+ "@id": "http://example.org/test#jane",
+ "ex:authored": "http://example.org/test#chapter",
+ "foaf:name": "Jane"
},
- "xsd": "http://www.w3.org/2001/XMLSchema#"
- },
- "@id": "http://example.org/test",
- "ex:bool": true,
- "ex:double": 1.23,
- "ex:double-zero": 0,
- "ex:int": 123
+ {
+ "@id": "http://example.org/test#john",
+ "foaf:name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "ex:contains": {
+ "@id": "http://example.org/test#book",
+ "dc:contributor": "Writer",
+ "dc:title": "My Book",
+ "ex:contains": "http://example.org/test#chapter"
+ }
+ }
+ ]
}
\ No newline at end of file
--- a/test-suite/tests/compact-0008-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0008-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,5 +1,8 @@
{
"@context": {
- "ex": "http://example.org/vocab#"
+ "http://example.org/test#property1": {"@type": "uri"},
+ "http://example.org/test#property2": {"@type": "uri"},
+ "http://example.org/test#property3": {"@type": "uri"},
+ "uri": "@id"
}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0008-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0008-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,7 +1,13 @@
-{
- "@id": "http://example.org/test",
- "http://example.org/vocab#test": {
- "@language": "en",
- "@value": "test"
- }
-}
\ No newline at end of file
+[{
+ "@id": "http://example.org/test#example1",
+ "http://example.org/test#property1": [{
+ "@id": "http://example.org/test#example2",
+ "http://example.org/test#property4": ["foo"]
+ }],
+ "http://example.org/test#property2": [{
+ "@id": "http://example.org/test#example3"
+ }],
+ "http://example.org/test#property3": [{
+ "@id": "http://example.org/test#example4"
+ }]
+}]
\ No newline at end of file
--- a/test-suite/tests/compact-0008-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0008-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,10 +1,15 @@
{
"@context": {
- "ex": "http://example.org/vocab#"
+ "http://example.org/test#property1": {"@type": "uri"},
+ "http://example.org/test#property2": {"@type": "uri"},
+ "http://example.org/test#property3": {"@type": "uri"},
+ "uri": "@id"
},
- "@id": "http://example.org/test",
- "ex:test": {
- "@language": "en",
- "@value": "test"
- }
+ "http://example.org/test#property1": {
+ "http://example.org/test#property4": "foo",
+ "uri": "http://example.org/test#example2"
+ },
+ "http://example.org/test#property2": "http://example.org/test#example3",
+ "http://example.org/test#property3": "http://example.org/test#example4",
+ "uri": "http://example.org/test#example1"
}
\ No newline at end of file
--- a/test-suite/tests/compact-0009-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0009-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,9 +1,7 @@
{
"@context": {
- "homepage": {
- "@id": "http://xmlns.com/foaf/0.1/homepage",
- "@type": "@id"
- },
- "name": "http://xmlns.com/foaf/0.1/name"
+ "dc": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:contains": {"@type": "@id"}
}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0009-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0009-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,9 +1,7 @@
-[
- {
- "http://xmlns.com/foaf/0.1/homepage": {
- "@id": "http://john.doe.org/"
- },
- "http://xmlns.com/foaf/0.1/name": "John Doe"
+{
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": {
+ "@id": "http://example.org/test#chapter"
},
- {}
-]
\ No newline at end of file
+ "http://purl.org/dc/elements/1.1/title": "Title"
+}
\ No newline at end of file
--- a/test-suite/tests/compact-0009-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0009-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,17 +1,10 @@
{
"@context": {
- "homepage": {
- "@id": "http://xmlns.com/foaf/0.1/homepage",
- "@type": "@id"
- },
- "name": "http://xmlns.com/foaf/0.1/name"
+ "dc": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:contains": {"@type": "@id"}
},
- "@id": [
- {
- "homepage": "http://john.doe.org/",
- "name": "John Doe"
- },
- {
- }
- ]
+ "@id": "http://example.org/test#book",
+ "dc:title": "Title",
+ "ex:contains": "http://example.org/test#chapter"
}
\ No newline at end of file
--- a/test-suite/tests/compact-0010-context.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0010-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,14 +1,6 @@
{
"@context": {
- "http://example.org/test#property1": {
- "@type": "uri"
- },
- "http://example.org/test#property2": {
- "@type": "uri"
- },
- "http://example.org/test#property3": {
- "@type": "uri"
- },
- "uri": "@id"
+ "homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id"},
+ "name": "http://xmlns.com/foaf/0.1/name"
}
}
\ No newline at end of file
--- a/test-suite/tests/compact-0010-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0010-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,13 +1,9 @@
-{
- "@id": "http://example.org/test#example1",
- "http://example.org/test#property1": {
- "@id": "http://example.org/test#example2",
- "http://example.org/test#property4": "foo"
+[
+ {
+ "http://xmlns.com/foaf/0.1/homepage": {
+ "@id": "http://john.doe.org/"
+ },
+ "http://xmlns.com/foaf/0.1/name": "John Doe"
},
- "http://example.org/test#property2": {
- "@id": "http://example.org/test#example3"
- },
- "http://example.org/test#property3": {
- "@id": "http://example.org/test#example4"
- }
-}
\ No newline at end of file
+ {}
+]
\ No newline at end of file
--- a/test-suite/tests/compact-0010-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-0010-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,18 +1,17 @@
{
"@context": {
- "http://example.org/test#property2": {
- "@type": "uri"
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
},
- "http://example.org/test#property3": {
- "@type": "uri"
- },
- "uri": "@id"
+ "name": "http://xmlns.com/foaf/0.1/name"
},
- "http://example.org/test#property1": {
- "http://example.org/test#property4": "foo",
- "uri": "http://example.org/test#example2"
- },
- "http://example.org/test#property2": "http://example.org/test#example3",
- "http://example.org/test#property3": "http://example.org/test#example4",
- "uri": "http://example.org/test#example1"
-}
+ "@graph": [
+ {
+ "homepage": "http://john.doe.org/",
+ "name": "John Doe"
+ },
+ {
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0011-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "ex:date": {"@type": "xsd:dateTime"},
+ "ex:parent": {"@type": "@id"},
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0011-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,13 @@
+{
+ "@id": "http://example.org/test#example1",
+ "http://example.org/vocab#date": {
+ "@value": "2011-01-25T00:00:00Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ },
+ "http://example.org/vocab#embed": {
+ "@id": "http://example.org/test#example2",
+ "http://example.org/vocab#parent": {
+ "@id": "http://example.org/test#example1"
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0011-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "ex:date": {"@type": "xsd:dateTime"},
+ "ex:parent": {"@type": "@id"},
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@id": "http://example.org/test#example1",
+ "ex:date": "2011-01-25T00:00:00Z",
+ "ex:embed": {
+ "@id": "http://example.org/test#example2",
+ "ex:parent": "http://example.org/test#example1"
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0012-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0012-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,5 @@
+{
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#bool": true,
+ "http://example.org/vocab#int": 123
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0012-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ },
+ "@id": "http://example.org/test",
+ "ex:bool": true,
+ "ex:int": 123
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0013-context.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0013-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,4 @@
+{
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#test": {"@value": "test", "@language": "en"}
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0013-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ },
+ "@id": "http://example.org/test",
+ "ex:test": {"@value": "test", "@language": "en"}
+}
\ No newline at end of file
--- a/test-suite/tests/compact-manifest.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/compact-manifest.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,68 +1,87 @@
{
- "@context": "http://json-ld.org/test-suite/context.jsonld",
- "@id": "",
- "@type": "jld:Manifest",
- "rdfs:comment": "JSON-LD to Compaction tests use object compare",
- "name": "compact",
- "sequence": [{
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "add context",
- "input": "compact-0001-in.jsonld",
- "context": "compact-0001-context.jsonld",
- "expect": "compact-0001-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "reduced context",
- "input": "compact-0002-in.jsonld",
- "context": "compact-0002-context.jsonld",
- "expect": "compact-0002-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "coerced ex:contains",
- "input": "compact-0003-in.jsonld",
- "context": "compact-0003-context.jsonld",
- "expect": "compact-0003-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "with coerce",
- "input": "compact-0004-in.jsonld",
- "context": "compact-0004-context.jsonld",
- "expect": "compact-0004-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "with date coerce",
- "input": "compact-0005-in.jsonld",
- "context": "compact-0005-context.jsonld",
- "expect": "compact-0005-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "native types",
- "input": "compact-0006-in.jsonld",
- "context": "compact-0006-context.jsonld",
- "expect": "compact-0006-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "native types with coerce",
- "input": "compact-0007-in.jsonld",
- "context": "compact-0007-context.jsonld",
- "expect": "compact-0007-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "literal with language",
- "input": "compact-0008-in.jsonld",
- "context": "compact-0008-context.jsonld",
- "expect": "compact-0008-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "disjoint graph as array",
- "input": "compact-0009-in.jsonld",
- "context": "compact-0009-context.jsonld",
- "expect": "compact-0009-out.jsonld"
- }, {
- "@type": ["test:TestCase", "jld:CompactTest"],
- "name": "alias keywords",
- "input": "compact-0010-in.jsonld",
- "context": "compact-0010-context.jsonld",
- "expect": "compact-0010-out.jsonld"
- }]
+ "@context": "http://json-ld.org/test-suite/context.jsonld",
+ "@id": "",
+ "@type": "jld:Manifest",
+ "rdfs:comment": "JSON-LD to Compaction tests use object compare",
+ "name": "compact",
+ "sequence": [{
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "id",
+ "input": "compact-0001-in.jsonld",
+ "context": "compact-0001-context.jsonld",
+ "expect": "compact-0001-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "basic",
+ "input": "compact-0002-in.jsonld",
+ "context": "compact-0002-context.jsonld",
+ "expect": "compact-0002-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "drop null and unmapped properties",
+ "input": "compact-0003-in.jsonld",
+ "context": "compact-0003-context.jsonld",
+ "expect": "compact-0003-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "optimize @set, keep empty arrays",
+ "input": "compact-0004-in.jsonld",
+ "context": "compact-0004-context.jsonld",
+ "expect": "compact-0004-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "@type and prefix compaction",
+ "input": "compact-0005-in.jsonld",
+ "context": "compact-0005-context.jsonld",
+ "expect": "compact-0005-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "compaction optimization",
+ "input": "compact-0006-in.jsonld",
+ "context": "compact-0006-context.jsonld",
+ "expect": "compact-0006-out.jsonld",
+ "optimize": true
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "add context",
+ "input": "compact-0007-in.jsonld",
+ "context": "compact-0007-context.jsonld",
+ "expect": "compact-0007-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "alias keywords",
+ "input": "compact-0008-in.jsonld",
+ "context": "compact-0008-context.jsonld",
+ "expect": "compact-0008-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "compact @id",
+ "input": "compact-0009-in.jsonld",
+ "context": "compact-0009-context.jsonld",
+ "expect": "compact-0009-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "array to @graph",
+ "input": "compact-0010-in.jsonld",
+ "context": "compact-0010-context.jsonld",
+ "expect": "compact-0010-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "compact date",
+ "input": "compact-0011-in.jsonld",
+ "context": "compact-0011-context.jsonld",
+ "expect": "compact-0011-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "native types",
+ "input": "compact-0012-in.jsonld",
+ "context": "compact-0012-context.jsonld",
+ "expect": "compact-0012-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "@value with @language",
+ "input": "compact-0013-in.jsonld",
+ "context": "compact-0013-context.jsonld",
+ "expect": "compact-0013-out.jsonld"
+ }]
}
--- a/test-suite/tests/expand-0008-in.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/expand-0008-in.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -3,8 +3,5 @@
"ex": "http://example.org/vocab#"
},
"@id": "http://example.org/test",
- "ex:test": {
- "@language": "en",
- "@value": "test"
- }
+ "ex:test": {"@value": "test", "@language": "en"}
}
\ No newline at end of file
--- a/test-suite/tests/expand-0008-out.jsonld Fri Mar 23 21:33:42 2012 -0400
+++ b/test-suite/tests/expand-0008-out.jsonld Fri Mar 23 21:47:45 2012 -0400
@@ -1,7 +1,4 @@
[{
"@id": "http://example.org/test",
- "http://example.org/vocab#test": [{
- "@language": "en",
- "@value": "test"
- }]
+ "http://example.org/vocab#test": [{"@value": "test", "@language": "en"}]
}]
\ No newline at end of file