From c9aa7d4ae189dab359f9bbb4894651a31974f6a9 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 13 May 2025 12:17:48 -0700 Subject: [PATCH 1/5] Updated test results for JSON-LD-star (other than annotation folding). This diverges from the existing spec behavior. --- tests/compact-manifest.jsonld | 122 ++------- tests/compact/st04-in.jsonld | 10 +- tests/compact/st04-out.jsonld | 12 +- tests/compact/st05-in.jsonld | 12 +- tests/compact/st05-out.jsonld | 14 +- tests/compact/st06-in.jsonld | 12 +- tests/compact/st06-out.jsonld | 14 +- tests/compact/st07-in.jsonld | 12 +- tests/compact/st07-out.jsonld | 14 +- tests/compact/st08-in.jsonld | 12 +- tests/compact/st08-out.jsonld | 14 +- tests/compact/st09-in.jsonld | 12 +- tests/compact/st09-out.jsonld | 14 +- tests/compact/st10-in.jsonld | 20 +- tests/compact/st10-out.jsonld | 21 +- tests/compact/st16-in.jsonld | 10 - tests/compact/st16-out.jsonld | 10 - tests/compact/st17-in.jsonld | 13 - tests/compact/st17-out.jsonld | 13 - tests/compact/st28-in.jsonld | 12 - tests/compact/st28-out.jsonld | 13 - tests/compact/st29-in.jsonld | 12 - tests/compact/st29-out.jsonld | 13 - tests/compact/st32-in.jsonld | 9 - tests/compact/st32-out.jsonld | 10 - tests/compact/st33-in.jsonld | 12 - tests/compact/st33-out.jsonld | 13 - tests/compact/st36-in.jsonld | 10 +- tests/compact/st36-out.jsonld | 16 +- tests/compact/st38-in.jsonld | 12 - tests/compact/st38-out.jsonld | 16 -- tests/compact/st39-in.jsonld | 14 - tests/compact/st39-out.jsonld | 15 -- tests/expand-manifest.jsonld | 243 +++++++++--------- tests/expand/st04-in.jsonld | 12 +- tests/expand/st04-out.jsonld | 10 +- tests/expand/st04a-in.jsonld | 8 + tests/expand/st04a-out.jsonld | 8 + tests/expand/st05-in.jsonld | 14 +- tests/expand/st05-out.jsonld | 12 +- .../{st15-in.jsonld => st05a-in.jsonld} | 8 +- .../st05a-out.jsonld} | 8 +- tests/expand/st06-in.jsonld | 14 +- tests/expand/st06-out.jsonld | 12 +- tests/expand/st06a-in.jsonld | 9 + tests/expand/st06a-out.jsonld | 9 + tests/expand/st07-in.jsonld | 14 +- tests/expand/st07-out.jsonld | 12 +- tests/expand/st07a-in.jsonld | 9 + tests/expand/st07a-out.jsonld | 9 + tests/expand/st08-in.jsonld | 14 +- tests/expand/st08-out.jsonld | 12 +- tests/expand/st08a-in.jsonld | 9 + .../st08a-out.jsonld} | 8 +- tests/expand/st09-in.jsonld | 14 +- tests/expand/st09-out.jsonld | 12 +- tests/expand/st09a-in.jsonld | 9 + tests/expand/st09a-out.jsonld | 9 + tests/expand/st10-in.jsonld | 21 +- tests/expand/st10-out.jsonld | 20 +- tests/expand/st10a-in.jsonld | 15 ++ tests/expand/st10a-out.jsonld | 14 + tests/expand/st11-in.jsonld | 10 +- tests/expand/st11a-in.jsonld | 8 + tests/expand/st12-in.jsonld | 11 +- tests/expand/st12a-in.jsonld | 8 + tests/expand/st12a-out.jsonld | 8 + tests/expand/st13-in.jsonld | 12 +- tests/expand/st13a-in.jsonld | 9 + tests/expand/st13a-out.jsonld | 9 + tests/expand/st14-in.jsonld | 14 +- tests/expand/st14a-in.jsonld | 10 + tests/expand/st14a-out.jsonld | 10 + tests/expand/st15-out.jsonld | 9 - tests/expand/st16-in.jsonld | 10 - tests/expand/st16-out.jsonld | 10 - tests/expand/st17-in.jsonld | 13 - tests/expand/st17-out.jsonld | 13 - tests/expand/st27a-in.jsonld | 2 +- tests/expand/st28-in.jsonld | 10 - tests/expand/st28-out.jsonld | 12 - tests/expand/st29-in.jsonld | 2 +- tests/expand/st29-out.jsonld | 12 - tests/expand/st30-in.jsonld | 10 - tests/expand/st31-in.jsonld | 9 - tests/expand/st32-in.jsonld | 10 - tests/expand/st32-out.jsonld | 9 - tests/expand/st33-in.jsonld | 13 - tests/expand/st33-out.jsonld | 12 - tests/expand/st36-in.jsonld | 16 +- tests/expand/st36-out.jsonld | 10 +- tests/expand/st38-in.jsonld | 15 -- tests/expand/st38-out.jsonld | 12 - tests/expand/st39-in.jsonld | 15 -- tests/expand/st39-out.jsonld | 14 - tests/flatten-manifest.jsonld | 61 ++--- tests/flatten/st04-in.jsonld | 14 +- tests/flatten/st04-out.jsonld | 10 +- tests/flatten/st05-in.jsonld | 14 +- tests/flatten/st05-out.jsonld | 12 +- tests/flatten/st06-in.jsonld | 14 +- tests/flatten/st06-out.jsonld | 12 +- tests/flatten/st07-in.jsonld | 14 +- tests/flatten/st07-out.jsonld | 12 +- tests/flatten/st08-in.jsonld | 14 +- tests/flatten/st08-out.jsonld | 14 +- tests/flatten/st09-in.jsonld | 14 +- tests/flatten/st09-out.jsonld | 12 +- tests/flatten/st10-in.jsonld | 21 +- tests/flatten/st10-out.jsonld | 20 +- tests/flatten/st15-in.jsonld | 9 - tests/flatten/st15-out.jsonld | 9 - tests/flatten/st16-in.jsonld | 10 - tests/flatten/st16-out.jsonld | 15 -- tests/flatten/st17-in.jsonld | 13 - tests/flatten/st17-out.jsonld | 21 -- tests/flatten/st18-out.jsonld | 8 +- tests/flatten/st18n-out.jsonld | 1 + tests/flatten/st19-out.jsonld | 10 +- tests/flatten/st20-out.jsonld | 15 +- tests/flatten/st20a-out.jsonld | 9 +- tests/flatten/st20an-out.jsonld | 1 + tests/flatten/st20b-out.jsonld | 3 + tests/flatten/st20n-out.jsonld | 1 + tests/flatten/st28-in.jsonld | 3 +- tests/flatten/st28-out.jsonld | 16 +- tests/flatten/st28n-out.jsonld | 4 +- tests/flatten/st29-in.jsonld | 2 +- tests/flatten/st29-out.jsonld | 23 +- tests/flatten/st29n-out.jsonld | 3 +- tests/flatten/st32-in.jsonld | 2 +- tests/flatten/st32-out.jsonld | 15 +- tests/flatten/st33-in.jsonld | 5 +- tests/flatten/st33-out.jsonld | 10 +- tests/flatten/st34-out.jsonld | 19 +- tests/flatten/st35-out.jsonld | 12 +- tests/flatten/st36-in.jsonld | 7 +- tests/flatten/st36-out.jsonld | 9 +- tests/flatten/st37-out.jsonld | 8 +- tests/flatten/st38-in.jsonld | 3 +- tests/flatten/st38-out.jsonld | 18 +- tests/flatten/st39-in.jsonld | 2 +- tests/flatten/st39-out.jsonld | 18 +- tests/flatten/st40-out.jsonld | 15 +- tests/fromRdf-manifest.jsonld | 104 +++----- tests/fromRdf/st02-in.nq | 1 - tests/fromRdf/st02-out.jsonld | 6 - tests/fromRdf/st03-in.nq | 1 - tests/fromRdf/st03-out.jsonld | 7 - tests/fromRdf/st04-in.nq | 2 +- tests/fromRdf/st04-out.jsonld | 12 +- tests/fromRdf/st05-in.nq | 2 +- tests/fromRdf/st05-out.jsonld | 14 +- tests/fromRdf/st06-in.nq | 2 +- tests/fromRdf/st06-out.jsonld | 14 +- tests/fromRdf/st07-in.nq | 2 +- tests/fromRdf/st07-out.jsonld | 7 +- tests/fromRdf/st08-in.nq | 2 +- tests/fromRdf/st08-out.jsonld | 14 +- tests/fromRdf/st09-in.nq | 2 +- tests/fromRdf/st09-out.jsonld | 14 +- tests/fromRdf/st10-in.nq | 2 +- tests/fromRdf/st10-out.jsonld | 22 +- tests/fromRdf/st15-in.nq | 3 +- tests/fromRdf/st15-out.jsonld | 10 +- tests/fromRdf/st16-in.nq | 5 +- tests/fromRdf/st16-out.jsonld | 12 +- tests/fromRdf/st17-in.nq | 8 +- tests/fromRdf/st17-out.jsonld | 30 +-- tests/fromRdf/st18-in.nq | 3 +- tests/fromRdf/st18-out.jsonld | 1 + tests/fromRdf/st19-in.nq | 3 +- tests/fromRdf/st20-in.nq | 6 +- tests/fromRdf/st20a-in.nq | 6 +- tests/fromRdf/st20b-in.nq | 3 - tests/fromRdf/st20b-out.jsonld | 9 - tests/fromRdf/st28-in.nq | 7 +- tests/fromRdf/st29-in.nq | 5 + tests/fromRdf/st32-in.nq | 1 - tests/fromRdf/st33-in.nq | 5 +- tests/fromRdf/st33-out.jsonld | 5 +- tests/fromRdf/st34-in.nq | 3 +- tests/fromRdf/st35-in.nq | 4 +- tests/fromRdf/st36-in.nq | 3 +- tests/fromRdf/st36-out.jsonld | 5 +- tests/toRdf-manifest.jsonld | 224 ++++++++-------- tests/toRdf/st01-in.jsonld | 2 +- tests/toRdf/st01-in.nq | 1 + tests/toRdf/st04-in.jsonld | 14 +- tests/toRdf/st04-out.nq | 2 +- tests/toRdf/st04a-in.jsonld | 8 + tests/toRdf/st04a-out.nq | 2 + tests/toRdf/st05-in.jsonld | 2 +- tests/toRdf/st05-out.nq | 3 +- .../st15-out.jsonld => toRdf/st05a-in.jsonld} | 8 +- tests/toRdf/st05a-out.nq | 2 + tests/toRdf/st06-in.jsonld | 14 +- tests/toRdf/st06-out.nq | 2 +- tests/toRdf/st06a-in.jsonld | 9 + tests/toRdf/st06a-out.nq | 2 + tests/toRdf/st07-in.jsonld | 14 +- tests/toRdf/st07-out.nq | 2 +- tests/toRdf/st07a-in.jsonld | 9 + tests/toRdf/st07a-out.nq | 2 + tests/toRdf/st08-in.jsonld | 14 +- tests/toRdf/st08-out.nq | 2 +- tests/toRdf/st08a-in.jsonld | 9 + tests/toRdf/st08a-out.nq | 2 + tests/toRdf/st09-in.jsonld | 14 +- tests/toRdf/st09-out.nq | 2 +- tests/toRdf/st09a-in.jsonld | 9 + tests/toRdf/st09a-out.nq | 2 + tests/toRdf/st10-in.jsonld | 21 +- tests/toRdf/st10-out.nq | 2 +- tests/toRdf/st10a-in.jsonld | 15 ++ tests/toRdf/st10a-out.nq | 3 + tests/toRdf/st11-in.jsonld | 10 +- tests/toRdf/st11a-in.jsonld | 8 + tests/toRdf/st12-in.jsonld | 11 +- tests/toRdf/st12a-in.jsonld | 8 + tests/toRdf/st12a-out.nq | 3 + tests/toRdf/st13-in.jsonld | 12 +- tests/toRdf/st13a-in.jsonld | 9 + tests/toRdf/st13a-out.nq | 3 + tests/toRdf/st14-in.jsonld | 14 +- tests/toRdf/st14a-in.jsonld | 10 + tests/toRdf/st14a-out.nq | 3 + tests/toRdf/st15-in.jsonld | 9 - tests/toRdf/st15-out.nq | 1 - tests/toRdf/st16-in.jsonld | 10 - tests/toRdf/st16-out.nq | 2 - tests/toRdf/st17-in.jsonld | 13 - tests/toRdf/st17-out.nq | 2 - tests/toRdf/st18-out.nq | 3 +- tests/toRdf/st19-out.nq | 7 +- tests/toRdf/st20-out.nq | 10 +- tests/toRdf/st20a-out.nq | 7 +- tests/toRdf/st20b-out.nq | 3 +- tests/toRdf/st27a-in.jsonld | 2 +- tests/toRdf/st28-in.jsonld | 2 +- tests/toRdf/st28-out.nq | 6 +- tests/toRdf/st29-in.jsonld | 2 +- tests/toRdf/st29-out.nq | 2 - tests/toRdf/st30-in.jsonld | 10 - tests/toRdf/st31-in.jsonld | 9 - tests/toRdf/st32-in.jsonld | 10 - tests/toRdf/st32-out.nq | 1 - tests/toRdf/st33-in.jsonld | 13 - tests/toRdf/st33-out.nq | 2 - tests/toRdf/st34-out.nq | 3 +- tests/toRdf/st35-out.nq | 5 +- tests/toRdf/st36-in.jsonld | 16 +- tests/toRdf/st36-out.nq | 2 +- tests/toRdf/st37-out.nq | 3 +- tests/toRdf/st38-in.jsonld | 15 -- tests/toRdf/st38-out.nq | 2 - tests/toRdf/st39-in.jsonld | 15 -- tests/toRdf/st39-out.nq | 2 - tests/toRdf/st40-out.nq | 6 +- 259 files changed, 1404 insertions(+), 1696 deletions(-) delete mode 100644 tests/compact/st16-in.jsonld delete mode 100644 tests/compact/st16-out.jsonld delete mode 100644 tests/compact/st17-in.jsonld delete mode 100644 tests/compact/st17-out.jsonld delete mode 100644 tests/compact/st28-in.jsonld delete mode 100644 tests/compact/st28-out.jsonld delete mode 100644 tests/compact/st29-in.jsonld delete mode 100644 tests/compact/st29-out.jsonld delete mode 100644 tests/compact/st32-in.jsonld delete mode 100644 tests/compact/st32-out.jsonld delete mode 100644 tests/compact/st33-in.jsonld delete mode 100644 tests/compact/st33-out.jsonld delete mode 100644 tests/compact/st38-in.jsonld delete mode 100644 tests/compact/st38-out.jsonld delete mode 100644 tests/compact/st39-in.jsonld delete mode 100644 tests/compact/st39-out.jsonld create mode 100644 tests/expand/st04a-in.jsonld create mode 100644 tests/expand/st04a-out.jsonld rename tests/expand/{st15-in.jsonld => st05a-in.jsonld} (54%) rename tests/{compact/st15-in.jsonld => expand/st05a-out.jsonld} (56%) create mode 100644 tests/expand/st06a-in.jsonld create mode 100644 tests/expand/st06a-out.jsonld create mode 100644 tests/expand/st07a-in.jsonld create mode 100644 tests/expand/st07a-out.jsonld create mode 100644 tests/expand/st08a-in.jsonld rename tests/{fromRdf/st32-out.jsonld => expand/st08a-out.jsonld} (56%) create mode 100644 tests/expand/st09a-in.jsonld create mode 100644 tests/expand/st09a-out.jsonld create mode 100644 tests/expand/st10a-in.jsonld create mode 100644 tests/expand/st10a-out.jsonld create mode 100644 tests/expand/st11a-in.jsonld create mode 100644 tests/expand/st12a-in.jsonld create mode 100644 tests/expand/st12a-out.jsonld create mode 100644 tests/expand/st13a-in.jsonld create mode 100644 tests/expand/st13a-out.jsonld create mode 100644 tests/expand/st14a-in.jsonld create mode 100644 tests/expand/st14a-out.jsonld delete mode 100644 tests/expand/st15-out.jsonld delete mode 100644 tests/expand/st16-in.jsonld delete mode 100644 tests/expand/st16-out.jsonld delete mode 100644 tests/expand/st17-in.jsonld delete mode 100644 tests/expand/st17-out.jsonld delete mode 100644 tests/expand/st28-in.jsonld delete mode 100644 tests/expand/st28-out.jsonld delete mode 100644 tests/expand/st29-out.jsonld delete mode 100644 tests/expand/st30-in.jsonld delete mode 100644 tests/expand/st31-in.jsonld delete mode 100644 tests/expand/st32-in.jsonld delete mode 100644 tests/expand/st32-out.jsonld delete mode 100644 tests/expand/st33-in.jsonld delete mode 100644 tests/expand/st33-out.jsonld delete mode 100644 tests/expand/st38-in.jsonld delete mode 100644 tests/expand/st38-out.jsonld delete mode 100644 tests/expand/st39-in.jsonld delete mode 100644 tests/expand/st39-out.jsonld delete mode 100644 tests/flatten/st15-in.jsonld delete mode 100644 tests/flatten/st15-out.jsonld delete mode 100644 tests/flatten/st16-in.jsonld delete mode 100644 tests/flatten/st16-out.jsonld delete mode 100644 tests/flatten/st17-in.jsonld delete mode 100644 tests/flatten/st17-out.jsonld delete mode 100644 tests/fromRdf/st02-in.nq delete mode 100644 tests/fromRdf/st02-out.jsonld delete mode 100644 tests/fromRdf/st03-in.nq delete mode 100644 tests/fromRdf/st03-out.jsonld delete mode 100644 tests/fromRdf/st20b-in.nq delete mode 100644 tests/fromRdf/st20b-out.jsonld delete mode 100644 tests/fromRdf/st32-in.nq create mode 100644 tests/toRdf/st01-in.nq create mode 100644 tests/toRdf/st04a-in.jsonld create mode 100644 tests/toRdf/st04a-out.nq rename tests/{compact/st15-out.jsonld => toRdf/st05a-in.jsonld} (54%) create mode 100644 tests/toRdf/st05a-out.nq create mode 100644 tests/toRdf/st06a-in.jsonld create mode 100644 tests/toRdf/st06a-out.nq create mode 100644 tests/toRdf/st07a-in.jsonld create mode 100644 tests/toRdf/st07a-out.nq create mode 100644 tests/toRdf/st08a-in.jsonld create mode 100644 tests/toRdf/st08a-out.nq create mode 100644 tests/toRdf/st09a-in.jsonld create mode 100644 tests/toRdf/st09a-out.nq create mode 100644 tests/toRdf/st10a-in.jsonld create mode 100644 tests/toRdf/st10a-out.nq create mode 100644 tests/toRdf/st11a-in.jsonld create mode 100644 tests/toRdf/st12a-in.jsonld create mode 100644 tests/toRdf/st12a-out.nq create mode 100644 tests/toRdf/st13a-in.jsonld create mode 100644 tests/toRdf/st13a-out.nq create mode 100644 tests/toRdf/st14a-in.jsonld create mode 100644 tests/toRdf/st14a-out.nq delete mode 100644 tests/toRdf/st15-in.jsonld delete mode 100644 tests/toRdf/st15-out.nq delete mode 100644 tests/toRdf/st16-in.jsonld delete mode 100644 tests/toRdf/st16-out.nq delete mode 100644 tests/toRdf/st17-in.jsonld delete mode 100644 tests/toRdf/st17-out.nq delete mode 100644 tests/toRdf/st29-out.nq delete mode 100644 tests/toRdf/st30-in.jsonld delete mode 100644 tests/toRdf/st31-in.jsonld delete mode 100644 tests/toRdf/st32-in.jsonld delete mode 100644 tests/toRdf/st32-out.nq delete mode 100644 tests/toRdf/st33-in.jsonld delete mode 100644 tests/toRdf/st33-out.nq delete mode 100644 tests/toRdf/st38-in.jsonld delete mode 100644 tests/toRdf/st38-out.nq delete mode 100644 tests/toRdf/st39-in.jsonld delete mode 100644 tests/toRdf/st39-out.nq diff --git a/tests/compact-manifest.jsonld b/tests/compact-manifest.jsonld index 4440d18..7d92857 100644 --- a/tests/compact-manifest.jsonld +++ b/tests/compact-manifest.jsonld @@ -9,8 +9,8 @@ { "@id": "#tst04", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 1", - "purpose": "Node with embedded subject having no @id", + "name": "triple term 1", + "purpose": "Node with triple term having no @id", "input": "compact/st04-in.jsonld", "context": "compact/st04-out.jsonld", "expect": "compact/st04-out.jsonld", @@ -19,8 +19,8 @@ }, { "@id": "#tst05", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 2", - "purpose": "Node with embedded subject having IRI @id", + "name": "triple term 2", + "purpose": "Node with triple term having IRI @id", "input": "compact/st05-in.jsonld", "context": "compact/st05-out.jsonld", "expect": "compact/st05-out.jsonld", @@ -29,8 +29,8 @@ }, { "@id": "#tst06", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 3", - "purpose": "Node with embedded subject having BNode @id", + "name": "triple term 3", + "purpose": "Node with triple term having BNode @id", "input": "compact/st06-in.jsonld", "context": "compact/st06-out.jsonld", "expect": "compact/st06-out.jsonld", @@ -39,8 +39,8 @@ }, { "@id": "#tst07", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 4", - "purpose": "Node with embedded subject having a type", + "name": "triple term 4", + "purpose": "Node with triple term having a type", "input": "compact/st07-in.jsonld", "context": "compact/st07-out.jsonld", "expect": "compact/st07-out.jsonld", @@ -49,8 +49,8 @@ }, { "@id": "#tst08", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 5", - "purpose": "Node with embedded subject having an IRI value", + "name": "triple term 5", + "purpose": "Node with triple term having an IRI value", "input": "compact/st08-in.jsonld", "context": "compact/st08-out.jsonld", "expect": "compact/st08-out.jsonld", @@ -59,8 +59,8 @@ }, { "@id": "#tst09", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 6", - "purpose": "Node with embedded subject having an BNode value", + "name": "triple term 6", + "purpose": "Node with triple term having an BNode value", "input": "compact/st09-in.jsonld", "context": "compact/st09-out.jsonld", "expect": "compact/st09-out.jsonld", @@ -69,43 +69,13 @@ }, { "@id": "#tst10", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 7", - "purpose": "Node with recursive embedded subject", + "name": "triple term 7", + "purpose": "Node with recursive triple term", "input": "compact/st10-in.jsonld", "context": "compact/st10-out.jsonld", "expect": "compact/st10-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst15", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 8", - "purpose": "Node with embedded object", - "input": "compact/st15-in.jsonld", - "context": "compact/st15-out.jsonld", - "expect": "compact/st15-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst16", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 9", - "purpose": "Node with embedded object having properties", - "input": "compact/st16-in.jsonld", - "context": "compact/st16-out.jsonld", - "expect": "compact/st16-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst17", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 10", - "purpose": "Node with recursive embedded object", - "input": "compact/st17-in.jsonld", - "context": "compact/st17-out.jsonld", - "expect": "compact/st17-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst18", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], @@ -156,46 +126,6 @@ "expect": "compact/st20b-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst28", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "Embedded annotation node 1", - "purpose": "Node with @annotation property on embedded subject", - "input": "compact/st28-in.jsonld", - "context": "compact/st28-out.jsonld", - "expect": "compact/st28-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst29", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "Embedded annotation node 2", - "purpose": "Node with @annotation property on embedded object", - "input": "compact/st29-in.jsonld", - "context": "compact/st29-out.jsonld", - "expect": "compact/st29-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst32", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 13", - "purpose": "Embedded node used as subject in reverse relationship", - "input": "compact/st32-in.jsonld", - "context": "compact/st32-out.jsonld", - "expect": "compact/st32-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst33", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "embedded node 14", - "purpose": "Embedded node used as object in reverse relationship", - "input": "compact/st33-in.jsonld", - "context": "compact/st33-out.jsonld", - "expect": "compact/st33-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst34", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], @@ -219,8 +149,8 @@ }, { "@id": "#tst36", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "Alias for embedded node", - "purpose": "embedded node with an alias of `@id`", + "name": "Alias for triple term", + "purpose": "triple term with an alias of `@triple`", "input": "compact/st36-in.jsonld", "context": "compact/st36-out.jsonld", "expect": "compact/st36-out.jsonld", @@ -236,26 +166,6 @@ "expect": "compact/st37-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst38", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "annotation value 1", - "purpose": "embedded node with annotation on value object", - "input": "compact/st38-in.jsonld", - "context": "compact/st38-out.jsonld", - "expect": "compact/st38-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst39", - "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], - "name": "annotation with embedded node 1", - "purpose": "annotation node containing an embedded node", - "input": "compact/st39-in.jsonld", - "context": "compact/st39-out.jsonld", - "expect": "compact/st39-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst40", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], diff --git a/tests/compact/st04-in.jsonld b/tests/compact/st04-in.jsonld index c39455f..265b082 100644 --- a/tests/compact/st04-in.jsonld +++ b/tests/compact/st04-in.jsonld @@ -1,6 +1,8 @@ [{ - "@id": { - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/compact/st04-out.jsonld b/tests/compact/st04-out.jsonld index 7299716..0d73a4b 100644 --- a/tests/compact/st04-out.jsonld +++ b/tests/compact/st04-out.jsonld @@ -1,6 +1,8 @@ { - "@id": { - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "ex:prop": "value" + } + } +} diff --git a/tests/compact/st05-in.jsonld b/tests/compact/st05-in.jsonld index a57163c..a72e5ba 100644 --- a/tests/compact/st05-in.jsonld +++ b/tests/compact/st05-in.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/compact/st05-out.jsonld b/tests/compact/st05-out.jsonld index 3dd38b3..79c8524 100644 --- a/tests/compact/st05-out.jsonld +++ b/tests/compact/st05-out.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/compact/st06-in.jsonld b/tests/compact/st06-in.jsonld index 784d3ba..1bf5ad0 100644 --- a/tests/compact/st06-in.jsonld +++ b/tests/compact/st06-in.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "_:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "_:rei", + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/compact/st06-out.jsonld b/tests/compact/st06-out.jsonld index dadf48a..05ba93c 100644 --- a/tests/compact/st06-out.jsonld +++ b/tests/compact/st06-out.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "_:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "_:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/compact/st07-in.jsonld b/tests/compact/st07-in.jsonld index 41082df..db0b4f2 100644 --- a/tests/compact/st07-in.jsonld +++ b/tests/compact/st07-in.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "@type": ["ex:Type"] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "@type": ["ex:Type"] + } + }] }] \ No newline at end of file diff --git a/tests/compact/st07-out.jsonld b/tests/compact/st07-out.jsonld index 7123c24..8c4dd90 100644 --- a/tests/compact/st07-out.jsonld +++ b/tests/compact/st07-out.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "@type": "ex:Type" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "@type": "ex:Type" + } + } +} diff --git a/tests/compact/st08-in.jsonld b/tests/compact/st08-in.jsonld index fa03d8a..54331cc 100644 --- a/tests/compact/st08-in.jsonld +++ b/tests/compact/st08-in.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@id": "ex:value"}] + } + }] }] \ No newline at end of file diff --git a/tests/compact/st08-out.jsonld b/tests/compact/st08-out.jsonld index c07dfed..a1f6525 100644 --- a/tests/compact/st08-out.jsonld +++ b/tests/compact/st08-out.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": {"@id": "ex:value"} + } + } +} diff --git a/tests/compact/st09-in.jsonld b/tests/compact/st09-in.jsonld index d2455c3..937a07e 100644 --- a/tests/compact/st09-in.jsonld +++ b/tests/compact/st09-in.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "_:value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@id": "_:value"}] + } + }] }] \ No newline at end of file diff --git a/tests/compact/st09-out.jsonld b/tests/compact/st09-out.jsonld index 8317fe1..3591fcf 100644 --- a/tests/compact/st09-out.jsonld +++ b/tests/compact/st09-out.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "_:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} + } + } +} diff --git a/tests/compact/st10-in.jsonld b/tests/compact/st10-in.jsonld index d9997e2..c1e34f9 100644 --- a/tests/compact/st10-in.jsonld +++ b/tests/compact/st10-in.jsonld @@ -1,10 +1,14 @@ [{ - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "http://example/s", + "http://example/p": [{ + "@triple": { + "@id": "http://example/s1", + "http://example/p1": [{ + "@triple": { + "@id": "http://example/s2", + "http://example/p2": [{"@id": "http://example/o2"}] + } + }] + } + }] }] \ No newline at end of file diff --git a/tests/compact/st10-out.jsonld b/tests/compact/st10-out.jsonld index 87bbd97..fecc2ca 100644 --- a/tests/compact/st10-out.jsonld +++ b/tests/compact/st10-out.jsonld @@ -1,10 +1,15 @@ { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value3" - }, - "ex:prop": "value" - }, - "ex:prop": "value2" + "@context": {"ex": "http://example/"}, + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:s1", + "ex:p1": { + "@triple": { + "@id": "ex:s2", + "ex:p2": {"@id": "ex:o2"} + } + } + } + } } \ No newline at end of file diff --git a/tests/compact/st16-in.jsonld b/tests/compact/st16-in.jsonld deleted file mode 100644 index 749da43..0000000 --- a/tests/compact/st16-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] - }] -}] \ No newline at end of file diff --git a/tests/compact/st16-out.jsonld b/tests/compact/st16-out.jsonld deleted file mode 100644 index a71537f..0000000 --- a/tests/compact/st16-out.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" - } -} \ No newline at end of file diff --git a/tests/compact/st17-in.jsonld b/tests/compact/st17-in.jsonld deleted file mode 100644 index 5ae9d7f..0000000 --- a/tests/compact/st17-in.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop":[{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] - }] -}] \ No newline at end of file diff --git a/tests/compact/st17-out.jsonld b/tests/compact/st17-out.jsonld deleted file mode 100644 index acf24c7..0000000 --- a/tests/compact/st17-out.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value3" - }, - "ex:prop": "value" - }, - "ex:prop": "value2" - } -} \ No newline at end of file diff --git a/tests/compact/st28-in.jsonld b/tests/compact/st28-in.jsonld deleted file mode 100644 index 700c5f2..0000000 --- a/tests/compact/st28-in.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -[{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "_:value"}] - }, - "ex:prop": [{ - "@value": "value2", - "@annotation": [{ - "ex:certainty": [{"@value": 0.8}] - }] - }] -}] \ No newline at end of file diff --git a/tests/compact/st28-out.jsonld b/tests/compact/st28-out.jsonld deleted file mode 100644 index ebf63d9..0000000 --- a/tests/compact/st28-out.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@context": { - "annotation": "@annotation" - }, - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "_:value"} - }, - "ex:prop": { - "@value": "value2", - "annotation": {"ex:certainty": 0.8} - } -} \ No newline at end of file diff --git a/tests/compact/st29-in.jsonld b/tests/compact/st29-in.jsonld deleted file mode 100644 index 61ae191..0000000 --- a/tests/compact/st29-in.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "@annotation": [{ - "ex:certainty": [{"@value": 0.8}] - }] - }] -}] \ No newline at end of file diff --git a/tests/compact/st29-out.jsonld b/tests/compact/st29-out.jsonld deleted file mode 100644 index dc745f1..0000000 --- a/tests/compact/st29-out.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@context": { - "annotation": "@annotation" - }, - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "annotation": {"ex:certainty": 0.8} - } -} \ No newline at end of file diff --git a/tests/compact/st32-in.jsonld b/tests/compact/st32-in.jsonld deleted file mode 100644 index f797933..0000000 --- a/tests/compact/st32-in.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }, - "@reverse": { - "ex:rel": [{"@id": "ex:value2"}] - } -}] \ No newline at end of file diff --git a/tests/compact/st32-out.jsonld b/tests/compact/st32-out.jsonld deleted file mode 100644 index a1689ec..0000000 --- a/tests/compact/st32-out.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": { - "rel": {"@reverse": "ex:rel"} - }, - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "rel": {"@id": "ex:value2"} -} \ No newline at end of file diff --git a/tests/compact/st33-in.jsonld b/tests/compact/st33-in.jsonld deleted file mode 100644 index d5ac08e..0000000 --- a/tests/compact/st33-in.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -[{ - "@id": "ex:subj", - "@reverse": { - "ex:rel": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }, - "ex:prop": [{"@id": "ex:value2"}] - }] - } -}] \ No newline at end of file diff --git a/tests/compact/st33-out.jsonld b/tests/compact/st33-out.jsonld deleted file mode 100644 index 90b80c6..0000000 --- a/tests/compact/st33-out.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@context": { - "rel": {"@reverse": "ex:rel"} - }, - "@id": "ex:subj", - "rel": { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "ex:prop": {"@id": "ex:value2"} - } -} \ No newline at end of file diff --git a/tests/compact/st36-in.jsonld b/tests/compact/st36-in.jsonld index c39455f..265b082 100644 --- a/tests/compact/st36-in.jsonld +++ b/tests/compact/st36-in.jsonld @@ -1,6 +1,8 @@ [{ - "@id": { - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/compact/st36-out.jsonld b/tests/compact/st36-out.jsonld index 8446b13..091b824 100644 --- a/tests/compact/st36-out.jsonld +++ b/tests/compact/st36-out.jsonld @@ -1,9 +1,9 @@ { - "@context": { - "triple": "@id" - }, - "triple": { - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@context": {"triple": "@triple"}, + "@id": "ex:s", + "ex:p": { + "triple": { + "ex:prop": "value" + } + } +} diff --git a/tests/compact/st38-in.jsonld b/tests/compact/st38-in.jsonld deleted file mode 100644 index a3ee597..0000000 --- a/tests/compact/st38-in.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -[{ - "@id": { - "@id": "http://example.org/bob", - "http://example.org/knows": [{"@id": "http://example.org/alice"}] - }, - "http://example.org/certainty": [{ - "@value": 0.8, - "@annotation": [{ - "http://example.org/claims": [{"@id": "http://example.org/ted"}] - }] - }] -}] \ No newline at end of file diff --git a/tests/compact/st38-out.jsonld b/tests/compact/st38-out.jsonld deleted file mode 100644 index 9c9b97e..0000000 --- a/tests/compact/st38-out.jsonld +++ /dev/null @@ -1,16 +0,0 @@ -{ - "@context": { - "@base": "http://example.org/", - "@vocab": "http://example.org/", - "metadata": "@annotation", - "claims": {"@type": "@id"} - }, - "@id": { - "@id": "bob", - "knows": {"@id": "alice"} - }, - "certainty": { - "@value": 0.8, - "metadata": {"claims": "ted"} - } -} \ No newline at end of file diff --git a/tests/compact/st39-in.jsonld b/tests/compact/st39-in.jsonld deleted file mode 100644 index fc64c6d..0000000 --- a/tests/compact/st39-in.jsonld +++ /dev/null @@ -1,14 +0,0 @@ -[{ - "@id": "ex:s", - "ex:p": [{ - "@id": "ex:o", - "@annotation": [{ - "ex:r": [{ - "@id": { - "@id": "ex:s1", - "ex:p1": [{"@id": "ex:o1"}] - } - }] - }] - }] -}] diff --git a/tests/compact/st39-out.jsonld b/tests/compact/st39-out.jsonld deleted file mode 100644 index 9224a19..0000000 --- a/tests/compact/st39-out.jsonld +++ /dev/null @@ -1,15 +0,0 @@ -{ - "@context": { - "@vocab": "ex:", - "p1": {"@type": "@id"} - }, - "@id": "ex:s", - "p": { - "@id": "ex:o", - "@annotation": { - "r": { - "@id": {"@id": "ex:s1", "p1": "ex:o1"} - } - } - } -} \ No newline at end of file diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld index c965682..8b01412 100644 --- a/tests/expand-manifest.jsonld +++ b/tests/expand-manifest.jsonld @@ -9,8 +9,8 @@ { "@id": "#tst01", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], - "name": "invalid embedded node 1", - "purpose": "Node with embedded subject without rdfstar option.", + "name": "invalid triple term 1", + "purpose": "Node with triple term without rdfstar option.", "input": "expand/st01-in.jsonld", "expectErrorCode": "invalid @id value", "requires": "JSON-LD-star", @@ -36,127 +36,199 @@ }, { "@id": "#tst04", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 1", - "purpose": "Node with embedded subject having no @id", + "name": "triple term 1", + "purpose": "Node with triple term having no @id", "input": "expand/st04-in.jsonld", "expect": "expand/st04-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst04a", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "reification 1", + "purpose": "Node with reification having no @id", + "input": "expand/st04a-in.jsonld", + "expect": "expand/st04a-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst05", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 2", - "purpose": "Node with embedded subject having IRI @id", + "name": "triple term 2", + "purpose": "Node with triple term having IRI @id", "input": "expand/st05-in.jsonld", "expect": "expand/st05-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst05a", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "reification 2", + "purpose": "Node with reification having IRI @id", + "input": "expand/st05a-in.jsonld", + "expect": "expand/st05a-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst06", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 3", - "purpose": "Node with embedded subject having BNode @id", + "name": "triple term 3", + "purpose": "Node with triple term having BNode @id", "input": "expand/st06-in.jsonld", "expect": "expand/st06-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst06a", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "reification 3", + "purpose": "Node with reification having BNode @id", + "input": "expand/st06a-in.jsonld", + "expect": "expand/st06a-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst07", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 4", - "purpose": "Node with embedded subject having a type", + "name": "triple term 4", + "purpose": "Node with triple term having a type", "input": "expand/st07-in.jsonld", "expect": "expand/st07-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst07a", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "reification 4", + "purpose": "Node with reification having a type", + "input": "expand/st07a-in.jsonld", + "expect": "expand/st07a-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst08", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 5", - "purpose": "Node with embedded subject having an IRI value", + "name": "triple term 5", + "purpose": "Node with triple term having an IRI value", "input": "expand/st08-in.jsonld", "expect": "expand/st08-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst08a", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "reification 5", + "purpose": "Node with reification having an IRI value", + "input": "expand/st08a-in.jsonld", + "expect": "expand/st08a-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst09", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 6", - "purpose": "Node with embedded subject having an BNode value", + "name": "triple term 6", + "purpose": "Node with triple term having an BNode value", "input": "expand/st09-in.jsonld", "expect": "expand/st09-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst09a", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "reification 6", + "purpose": "Node with reification having an BNode value", + "input": "expand/st09a-in.jsonld", + "expect": "expand/st09a-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst10", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 7", - "purpose": "Node with recursive embedded subject", + "name": "triple term 7", + "purpose": "Node with recursive triple term", "input": "expand/st10-in.jsonld", "expect": "expand/st10-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst10a", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "reification 7", + "purpose": "Node with recursive reification", + "input": "expand/st10a-in.jsonld", + "expect": "expand/st10a-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst11", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], - "name": "invalid embedded node 2", - "purpose": "Illegal node with subject having no property", + "name": "invalid triple term 2", + "purpose": "Illegal node with triple term having no property", "input": "expand/st11-in.jsonld", - "expectErrorCode": "invalid embedded node", + "expectErrorCode": "invalid triple term", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst11a", + "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], + "name": "invalid reification 2", + "purpose": "Illegal node with reification having no property", + "input": "expand/st11a-in.jsonld", + "expectErrorCode": "invalid reification", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst12", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], - "name": "invalid embedded node 3", - "purpose": "Illegal node with subject having multiple properties", + "name": "invalid triple term 3", + "purpose": "Illegal node with triple term having multiple properties", "input": "expand/st12-in.jsonld", - "expectErrorCode": "invalid embedded node", + "expectErrorCode": "invalid triple term", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst13", - "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], - "name": "invalid embedded node 4", - "purpose": "Illegal node with subject having multiple types", - "input": "expand/st13-in.jsonld", - "expectErrorCode": "invalid embedded node", + "@id": "#tst12a", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "multi-statement reification", + "purpose": "Node with reification having multiple values", + "input": "expand/st12a-in.jsonld", + "expect": "expand/st12a-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst14", + "@id": "#tst13", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], - "name": "invalid embedded node 5", - "purpose": "Illegal node with subject having type and property", - "input": "expand/st14-in.jsonld", - "expectErrorCode": "invalid embedded node", + "name": "invalid triple term 4", + "purpose": "Illegal node with triple term having multiple types", + "input": "expand/st13-in.jsonld", + "expectErrorCode": "invalid triple term", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst15", + "@id": "#tst13a", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 8", - "purpose": "Node with embedded object", - "input": "expand/st15-in.jsonld", - "expect": "expand/st15-out.jsonld", + "name": "multi-statement reification 4", + "purpose": "Node with reification having multiple types", + "input": "expand/st13a-in.jsonld", + "expect": "expand/st13a-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst16", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 9", - "purpose": "Node with embedded object having properties", - "input": "expand/st16-in.jsonld", - "expect": "expand/st16-out.jsonld", + "@id": "#tst14", + "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], + "name": "invalid triple term 5", + "purpose": "Illegal node with triple term having type and property", + "input": "expand/st14-in.jsonld", + "expectErrorCode": "invalid triple term", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst17", + "@id": "#tst14a", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 10", - "purpose": "Node with recursive embedded object", - "input": "expand/st17-in.jsonld", - "expect": "expand/st17-out.jsonld", + "name": "multi-statement reification 5", + "purpose": "Node with reification having type and property", + "input": "expand/st14a-in.jsonld", + "expect": "expand/st14a-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { @@ -280,63 +352,18 @@ "@id": "#tst27a", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], "name": "Invalid annotation node 9", - "purpose": "Node with @annotation that is an embedded node is invalid", + "purpose": "Node with @annotation that is a triple term is invalid", "input": "expand/st27a-in.jsonld", "expectErrorCode": "invalid annotation", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst28", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Embedded annotation node 1", - "purpose": "Node with @annotation property on embedded subject", - "input": "expand/st28-in.jsonld", - "expect": "expand/st28-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst29", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], "name": "Embedded annotation node 1", "purpose": "Node with @annotation property on embedded object", "input": "expand/st29-in.jsonld", - "expect": "expand/st29-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst30", - "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 11", - "purpose": "Embedded node with reverse relationship", - "input": "expand/st30-in.jsonld", - "expectErrorCode": "invalid embedded node", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst31", - "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 12", - "purpose": "Embedded node with expanded reverse relationship", - "input": "expand/st31-in.jsonld", - "expectErrorCode": "invalid embedded node", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst32", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 13", - "purpose": "Embedded node used as subject in reverse relationship", - "input": "expand/st32-in.jsonld", - "expect": "expand/st32-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst33", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "embedded node 14", - "purpose": "Embedded node used as object in reverse relationship", - "input": "expand/st33-in.jsonld", - "expect": "expand/st33-out.jsonld", + "expectErrorCode": "invalid triple term", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { @@ -360,8 +387,8 @@ }, { "@id": "#tst36", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Alias for embedded node", - "purpose": "embedded node with an alias of `@id`", + "name": "Alias for triple term", + "purpose": "triple term with an alias of `@id`", "input": "expand/st36-in.jsonld", "expect": "expand/st36-out.jsonld", "requires": "JSON-LD-star", @@ -375,24 +402,6 @@ "expect": "expand/st37-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst38", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "annotation value 1", - "purpose": "embedded node with annotation on value object", - "input": "expand/st38-in.jsonld", - "expect": "expand/st38-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst39", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "annotation with embedded node 1", - "purpose": "annotation node containing an embedded node", - "input": "expand/st39-in.jsonld", - "expect": "expand/st39-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst40", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], diff --git a/tests/expand/st04-in.jsonld b/tests/expand/st04-in.jsonld index 7299716..0d73a4b 100644 --- a/tests/expand/st04-in.jsonld +++ b/tests/expand/st04-in.jsonld @@ -1,6 +1,8 @@ { - "@id": { - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "ex:prop": "value" + } + } +} diff --git a/tests/expand/st04-out.jsonld b/tests/expand/st04-out.jsonld index c39455f..265b082 100644 --- a/tests/expand/st04-out.jsonld +++ b/tests/expand/st04-out.jsonld @@ -1,6 +1,8 @@ [{ - "@id": { - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/expand/st04a-in.jsonld b/tests/expand/st04a-in.jsonld new file mode 100644 index 0000000..79b21f9 --- /dev/null +++ b/tests/expand/st04a-in.jsonld @@ -0,0 +1,8 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "ex:prop": "value" + } + } +} diff --git a/tests/expand/st04a-out.jsonld b/tests/expand/st04a-out.jsonld new file mode 100644 index 0000000..ae45c29 --- /dev/null +++ b/tests/expand/st04a-out.jsonld @@ -0,0 +1,8 @@ +[{ + "@id": "ex:s", + "ex:p": [{ + "@reifies": [{ + "ex:prop": [{"@value": "value"}] + }] + }] +}] \ No newline at end of file diff --git a/tests/expand/st05-in.jsonld b/tests/expand/st05-in.jsonld index 3dd38b3..79c8524 100644 --- a/tests/expand/st05-in.jsonld +++ b/tests/expand/st05-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/expand/st05-out.jsonld b/tests/expand/st05-out.jsonld index a57163c..a72e5ba 100644 --- a/tests/expand/st05-out.jsonld +++ b/tests/expand/st05-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/expand/st15-in.jsonld b/tests/expand/st05a-in.jsonld similarity index 54% rename from tests/expand/st15-in.jsonld rename to tests/expand/st05a-in.jsonld index e041305..e8db352 100644 --- a/tests/expand/st15-in.jsonld +++ b/tests/expand/st05a-in.jsonld @@ -1,9 +1,9 @@ { - "@id": "ex:subj", - "ex:value": { - "@id": { + "@id": "ex:s", + "ex:p": { + "@reifies": { "@id": "ex:rei", "ex:prop": "value" } } -} \ No newline at end of file +} diff --git a/tests/compact/st15-in.jsonld b/tests/expand/st05a-out.jsonld similarity index 56% rename from tests/compact/st15-in.jsonld rename to tests/expand/st05a-out.jsonld index 921aed3..7fa58d0 100644 --- a/tests/compact/st15-in.jsonld +++ b/tests/expand/st05a-out.jsonld @@ -1,9 +1,9 @@ [{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { + "@id": "ex:s", + "ex:p": [{ + "@reifies": [{ "@id": "ex:rei", "ex:prop": [{"@value": "value"}] - } + }] }] }] \ No newline at end of file diff --git a/tests/expand/st06-in.jsonld b/tests/expand/st06-in.jsonld index dadf48a..05ba93c 100644 --- a/tests/expand/st06-in.jsonld +++ b/tests/expand/st06-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "_:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "_:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/expand/st06-out.jsonld b/tests/expand/st06-out.jsonld index 784d3ba..1bf5ad0 100644 --- a/tests/expand/st06-out.jsonld +++ b/tests/expand/st06-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "_:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "_:rei", + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/expand/st06a-in.jsonld b/tests/expand/st06a-in.jsonld new file mode 100644 index 0000000..97a63c9 --- /dev/null +++ b/tests/expand/st06a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "_:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/expand/st06a-out.jsonld b/tests/expand/st06a-out.jsonld new file mode 100644 index 0000000..55f266e --- /dev/null +++ b/tests/expand/st06a-out.jsonld @@ -0,0 +1,9 @@ +[{ + "@id": "ex:s", + "ex:p": [{ + "@reifies": [{ + "@id": "_:rei", + "ex:prop": [{"@value": "value"}] + }] + }] +}] \ No newline at end of file diff --git a/tests/expand/st07-in.jsonld b/tests/expand/st07-in.jsonld index 7123c24..8c4dd90 100644 --- a/tests/expand/st07-in.jsonld +++ b/tests/expand/st07-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "@type": "ex:Type" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "@type": "ex:Type" + } + } +} diff --git a/tests/expand/st07-out.jsonld b/tests/expand/st07-out.jsonld index 41082df..db0b4f2 100644 --- a/tests/expand/st07-out.jsonld +++ b/tests/expand/st07-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "@type": ["ex:Type"] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "@type": ["ex:Type"] + } + }] }] \ No newline at end of file diff --git a/tests/expand/st07a-in.jsonld b/tests/expand/st07a-in.jsonld new file mode 100644 index 0000000..eb60a85 --- /dev/null +++ b/tests/expand/st07a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "ex:rei", + "@type": "ex:Type" + } + } +} diff --git a/tests/expand/st07a-out.jsonld b/tests/expand/st07a-out.jsonld new file mode 100644 index 0000000..ecf2e0c --- /dev/null +++ b/tests/expand/st07a-out.jsonld @@ -0,0 +1,9 @@ +[{ + "@id": "ex:s", + "ex:p": [{ + "@reifies": [{ + "@id": "ex:rei", + "@type": ["ex:Type"] + }] + }] +}] \ No newline at end of file diff --git a/tests/expand/st08-in.jsonld b/tests/expand/st08-in.jsonld index c07dfed..a1f6525 100644 --- a/tests/expand/st08-in.jsonld +++ b/tests/expand/st08-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": {"@id": "ex:value"} + } + } +} diff --git a/tests/expand/st08-out.jsonld b/tests/expand/st08-out.jsonld index fa03d8a..54331cc 100644 --- a/tests/expand/st08-out.jsonld +++ b/tests/expand/st08-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@id": "ex:value"}] + } + }] }] \ No newline at end of file diff --git a/tests/expand/st08a-in.jsonld b/tests/expand/st08a-in.jsonld new file mode 100644 index 0000000..54c1288 --- /dev/null +++ b/tests/expand/st08a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "ex:value"} + } + } +} diff --git a/tests/fromRdf/st32-out.jsonld b/tests/expand/st08a-out.jsonld similarity index 56% rename from tests/fromRdf/st32-out.jsonld rename to tests/expand/st08a-out.jsonld index 8edbbbe..f9fba8f 100644 --- a/tests/fromRdf/st32-out.jsonld +++ b/tests/expand/st08a-out.jsonld @@ -1,9 +1,9 @@ [{ - "@id": "ex:value2", - "ex:rel": [{ - "@id": { + "@id": "ex:s", + "ex:p": [{ + "@reifies": [{ "@id": "ex:rei", "ex:prop": [{"@id": "ex:value"}] - } + }] }] }] \ No newline at end of file diff --git a/tests/expand/st09-in.jsonld b/tests/expand/st09-in.jsonld index 8317fe1..3591fcf 100644 --- a/tests/expand/st09-in.jsonld +++ b/tests/expand/st09-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "_:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} + } + } +} diff --git a/tests/expand/st09-out.jsonld b/tests/expand/st09-out.jsonld index d2455c3..937a07e 100644 --- a/tests/expand/st09-out.jsonld +++ b/tests/expand/st09-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "_:value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@id": "_:value"}] + } + }] }] \ No newline at end of file diff --git a/tests/expand/st09a-in.jsonld b/tests/expand/st09a-in.jsonld new file mode 100644 index 0000000..e7f1a40 --- /dev/null +++ b/tests/expand/st09a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} + } + } +} diff --git a/tests/expand/st09a-out.jsonld b/tests/expand/st09a-out.jsonld new file mode 100644 index 0000000..03cf5af --- /dev/null +++ b/tests/expand/st09a-out.jsonld @@ -0,0 +1,9 @@ +[{ + "@id": "ex:s", + "ex:p": [{ + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@id": "_:value"}] + }] + }] +}] \ No newline at end of file diff --git a/tests/expand/st10-in.jsonld b/tests/expand/st10-in.jsonld index 87bbd97..fecc2ca 100644 --- a/tests/expand/st10-in.jsonld +++ b/tests/expand/st10-in.jsonld @@ -1,10 +1,15 @@ { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value3" - }, - "ex:prop": "value" - }, - "ex:prop": "value2" + "@context": {"ex": "http://example/"}, + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:s1", + "ex:p1": { + "@triple": { + "@id": "ex:s2", + "ex:p2": {"@id": "ex:o2"} + } + } + } + } } \ No newline at end of file diff --git a/tests/expand/st10-out.jsonld b/tests/expand/st10-out.jsonld index d9997e2..c1e34f9 100644 --- a/tests/expand/st10-out.jsonld +++ b/tests/expand/st10-out.jsonld @@ -1,10 +1,14 @@ [{ - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "http://example/s", + "http://example/p": [{ + "@triple": { + "@id": "http://example/s1", + "http://example/p1": [{ + "@triple": { + "@id": "http://example/s2", + "http://example/p2": [{"@id": "http://example/o2"}] + } + }] + } + }] }] \ No newline at end of file diff --git a/tests/expand/st10a-in.jsonld b/tests/expand/st10a-in.jsonld new file mode 100644 index 0000000..c89d28d --- /dev/null +++ b/tests/expand/st10a-in.jsonld @@ -0,0 +1,15 @@ +{ + "@context": {"ex": "http://example/"}, + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "ex:s1", + "ex:p1": { + "@reifies": { + "@id": "ex:s2", + "ex:p2": {"@id": "ex:o2"} + } + } + } + } +} \ No newline at end of file diff --git a/tests/expand/st10a-out.jsonld b/tests/expand/st10a-out.jsonld new file mode 100644 index 0000000..7e625d2 --- /dev/null +++ b/tests/expand/st10a-out.jsonld @@ -0,0 +1,14 @@ +[{ + "@id": "http://example/s", + "http://example/p": [{ + "@reifies": [{ + "@id": "http://example/s1", + "http://example/p1": [{ + "@reifies": [{ + "@id": "http://example/s2", + "http://example/p2": [{"@id": "http://example/o2"}] + }] + }] + }] + }] +}] \ No newline at end of file diff --git a/tests/expand/st11-in.jsonld b/tests/expand/st11-in.jsonld index ce4cb23..d6a0609 100644 --- a/tests/expand/st11-in.jsonld +++ b/tests/expand/st11-in.jsonld @@ -1,6 +1,8 @@ { - "@id": { - "@id": "ex:rei" - }, - "ex:prop": "value3" + "@id": "ex:s", + "ex:prop": { + "@triple": { + "@id": "ex:rei" + } + } } \ No newline at end of file diff --git a/tests/expand/st11a-in.jsonld b/tests/expand/st11a-in.jsonld new file mode 100644 index 0000000..04a112f --- /dev/null +++ b/tests/expand/st11a-in.jsonld @@ -0,0 +1,8 @@ +{ + "@id": "ex:s", + "ex:prop": { + "@reifies": { + "@id": "ex:rei" + } + } +} \ No newline at end of file diff --git a/tests/expand/st12-in.jsonld b/tests/expand/st12-in.jsonld index 8505f28..ed7053e 100644 --- a/tests/expand/st12-in.jsonld +++ b/tests/expand/st12-in.jsonld @@ -1,7 +1,8 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": ["value1", "value2"] - }, - "ex:prop": "value3" + "@id": "ex:s", + "ex:prop": { + "@triple": { + "ex:p": ["value1", "value2"] + } + } } \ No newline at end of file diff --git a/tests/expand/st12a-in.jsonld b/tests/expand/st12a-in.jsonld new file mode 100644 index 0000000..122ee1c --- /dev/null +++ b/tests/expand/st12a-in.jsonld @@ -0,0 +1,8 @@ +{ + "@id": "ex:s", + "ex:prop": { + "@reifies": { + "ex:p": ["value1", "value2"] + } + } +} \ No newline at end of file diff --git a/tests/expand/st12a-out.jsonld b/tests/expand/st12a-out.jsonld new file mode 100644 index 0000000..fdf3c41 --- /dev/null +++ b/tests/expand/st12a-out.jsonld @@ -0,0 +1,8 @@ +[{ + "@id": "ex:s", + "ex:prop": [{ + "@reifies": [{ + "ex:p": [{"@value": "value1"}, {"@value": "value2"}] + }] + }] +}] \ No newline at end of file diff --git a/tests/expand/st13-in.jsonld b/tests/expand/st13-in.jsonld index 47ac51c..bf84b68 100644 --- a/tests/expand/st13-in.jsonld +++ b/tests/expand/st13-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "@type": ["ex:Type1", "ex:Type2"] - }, - "ex:prop": "value3" + "@id": "ex:s", + "ex:prop": { + "@triple": { + "@id": "ex:rei", + "@type": ["ex:Type1", "ex:Type2"] + } + } } \ No newline at end of file diff --git a/tests/expand/st13a-in.jsonld b/tests/expand/st13a-in.jsonld new file mode 100644 index 0000000..9dd6665 --- /dev/null +++ b/tests/expand/st13a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:prop": { + "@reifies": { + "@id": "ex:rei", + "@type": ["ex:Type1", "ex:Type2"] + } + } +} \ No newline at end of file diff --git a/tests/expand/st13a-out.jsonld b/tests/expand/st13a-out.jsonld new file mode 100644 index 0000000..2112a33 --- /dev/null +++ b/tests/expand/st13a-out.jsonld @@ -0,0 +1,9 @@ +[{ + "@id": "ex:s", + "ex:prop": [{ + "@reifies": [{ + "@id": "ex:rei", + "@type": ["ex:Type1", "ex:Type2"] + }] + }] +}] \ No newline at end of file diff --git a/tests/expand/st14-in.jsonld b/tests/expand/st14-in.jsonld index d058202..8760874 100644 --- a/tests/expand/st14-in.jsonld +++ b/tests/expand/st14-in.jsonld @@ -1,8 +1,10 @@ { - "@id": { - "@id": "ex:rei", - "@type": "ex:Type", - "ex:prop": "value" - }, - "ex:prop": "value2" + "@id": "ex:s", + "ex:prop": { + "@triple": { + "@id": "ex:rei", + "@type": "ex:Type", + "ex:prop": "value" + } + } } \ No newline at end of file diff --git a/tests/expand/st14a-in.jsonld b/tests/expand/st14a-in.jsonld new file mode 100644 index 0000000..829313a --- /dev/null +++ b/tests/expand/st14a-in.jsonld @@ -0,0 +1,10 @@ +{ + "@id": "ex:s", + "ex:prop": { + "@reifies": { + "@id": "ex:rei", + "@type": "ex:Type", + "ex:prop": "value" + } + } +} \ No newline at end of file diff --git a/tests/expand/st14a-out.jsonld b/tests/expand/st14a-out.jsonld new file mode 100644 index 0000000..96382e8 --- /dev/null +++ b/tests/expand/st14a-out.jsonld @@ -0,0 +1,10 @@ +[{ + "@id": "ex:s", + "ex:prop": [{ + "@reifies": [{ + "@id": "ex:rei", + "@type": ["ex:Type"], + "ex:prop": [{"@value": "value"}] + }] + }] +}] \ No newline at end of file diff --git a/tests/expand/st15-out.jsonld b/tests/expand/st15-out.jsonld deleted file mode 100644 index 921aed3..0000000 --- a/tests/expand/st15-out.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - } - }] -}] \ No newline at end of file diff --git a/tests/expand/st16-in.jsonld b/tests/expand/st16-in.jsonld deleted file mode 100644 index a71537f..0000000 --- a/tests/expand/st16-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" - } -} \ No newline at end of file diff --git a/tests/expand/st16-out.jsonld b/tests/expand/st16-out.jsonld deleted file mode 100644 index 749da43..0000000 --- a/tests/expand/st16-out.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] - }] -}] \ No newline at end of file diff --git a/tests/expand/st17-in.jsonld b/tests/expand/st17-in.jsonld deleted file mode 100644 index acf24c7..0000000 --- a/tests/expand/st17-in.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value3" - }, - "ex:prop": "value" - }, - "ex:prop": "value2" - } -} \ No newline at end of file diff --git a/tests/expand/st17-out.jsonld b/tests/expand/st17-out.jsonld deleted file mode 100644 index 5ae9d7f..0000000 --- a/tests/expand/st17-out.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop":[{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] - }] -}] \ No newline at end of file diff --git a/tests/expand/st27a-in.jsonld b/tests/expand/st27a-in.jsonld index 0994836..fff9466 100644 --- a/tests/expand/st27a-in.jsonld +++ b/tests/expand/st27a-in.jsonld @@ -1,7 +1,7 @@ { "@id": "ex:bob", "ex:claims": { - "@id": { + "@triple": { "@id": "ex:fred", "name": "Fred", "@annotation": { diff --git a/tests/expand/st28-in.jsonld b/tests/expand/st28-in.jsonld deleted file mode 100644 index 64f037b..0000000 --- a/tests/expand/st28-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "_:value"} - }, - "ex:prop": { - "@value": "value2", - "@annotation": {"ex:certainty": 0.8} - } -} \ No newline at end of file diff --git a/tests/expand/st28-out.jsonld b/tests/expand/st28-out.jsonld deleted file mode 100644 index 700c5f2..0000000 --- a/tests/expand/st28-out.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -[{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "_:value"}] - }, - "ex:prop": [{ - "@value": "value2", - "@annotation": [{ - "ex:certainty": [{"@value": 0.8}] - }] - }] -}] \ No newline at end of file diff --git a/tests/expand/st29-in.jsonld b/tests/expand/st29-in.jsonld index 5597b3d..61871b4 100644 --- a/tests/expand/st29-in.jsonld +++ b/tests/expand/st29-in.jsonld @@ -1,7 +1,7 @@ { "@id": "ex:subj", "ex:value": { - "@id": { + "@triple": { "@id": "ex:rei", "ex:prop": "value" }, diff --git a/tests/expand/st29-out.jsonld b/tests/expand/st29-out.jsonld deleted file mode 100644 index 61ae191..0000000 --- a/tests/expand/st29-out.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "@annotation": [{ - "ex:certainty": [{"@value": 0.8}] - }] - }] -}] \ No newline at end of file diff --git a/tests/expand/st30-in.jsonld b/tests/expand/st30-in.jsonld deleted file mode 100644 index 1985c87..0000000 --- a/tests/expand/st30-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": { - "rel": {"@reverse": "ex:rel"} - }, - "@id": { - "@id": "ex:rei", - "rel": {"@id": "ex:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file diff --git a/tests/expand/st31-in.jsonld b/tests/expand/st31-in.jsonld deleted file mode 100644 index 4c2967e..0000000 --- a/tests/expand/st31-in.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -{ - "@id": { - "@id": "ex:rei", - "@reverse": { - "ex:rel": {"@id": "ex:value"} - } - }, - "ex:prop": "value2" -} \ No newline at end of file diff --git a/tests/expand/st32-in.jsonld b/tests/expand/st32-in.jsonld deleted file mode 100644 index a1689ec..0000000 --- a/tests/expand/st32-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": { - "rel": {"@reverse": "ex:rel"} - }, - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "rel": {"@id": "ex:value2"} -} \ No newline at end of file diff --git a/tests/expand/st32-out.jsonld b/tests/expand/st32-out.jsonld deleted file mode 100644 index f797933..0000000 --- a/tests/expand/st32-out.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }, - "@reverse": { - "ex:rel": [{"@id": "ex:value2"}] - } -}] \ No newline at end of file diff --git a/tests/expand/st33-in.jsonld b/tests/expand/st33-in.jsonld deleted file mode 100644 index 90b80c6..0000000 --- a/tests/expand/st33-in.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@context": { - "rel": {"@reverse": "ex:rel"} - }, - "@id": "ex:subj", - "rel": { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "ex:prop": {"@id": "ex:value2"} - } -} \ No newline at end of file diff --git a/tests/expand/st33-out.jsonld b/tests/expand/st33-out.jsonld deleted file mode 100644 index d5ac08e..0000000 --- a/tests/expand/st33-out.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -[{ - "@id": "ex:subj", - "@reverse": { - "ex:rel": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }, - "ex:prop": [{"@id": "ex:value2"}] - }] - } -}] \ No newline at end of file diff --git a/tests/expand/st36-in.jsonld b/tests/expand/st36-in.jsonld index 8446b13..091b824 100644 --- a/tests/expand/st36-in.jsonld +++ b/tests/expand/st36-in.jsonld @@ -1,9 +1,9 @@ { - "@context": { - "triple": "@id" - }, - "triple": { - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@context": {"triple": "@triple"}, + "@id": "ex:s", + "ex:p": { + "triple": { + "ex:prop": "value" + } + } +} diff --git a/tests/expand/st36-out.jsonld b/tests/expand/st36-out.jsonld index c39455f..265b082 100644 --- a/tests/expand/st36-out.jsonld +++ b/tests/expand/st36-out.jsonld @@ -1,6 +1,8 @@ [{ - "@id": { - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/expand/st38-in.jsonld b/tests/expand/st38-in.jsonld deleted file mode 100644 index e07a2e3..0000000 --- a/tests/expand/st38-in.jsonld +++ /dev/null @@ -1,15 +0,0 @@ -{ - "@context": { - "@base": "http://example.org/", - "@vocab": "http://example.org/", - "claims": {"@type": "@id"} - }, - "@id": { - "@id": "bob", - "knows": {"@id": "alice"} - }, - "certainty": { - "@value": 0.8, - "@annotation": {"claims": "ted"} - } -} \ No newline at end of file diff --git a/tests/expand/st38-out.jsonld b/tests/expand/st38-out.jsonld deleted file mode 100644 index a3ee597..0000000 --- a/tests/expand/st38-out.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -[{ - "@id": { - "@id": "http://example.org/bob", - "http://example.org/knows": [{"@id": "http://example.org/alice"}] - }, - "http://example.org/certainty": [{ - "@value": 0.8, - "@annotation": [{ - "http://example.org/claims": [{"@id": "http://example.org/ted"}] - }] - }] -}] \ No newline at end of file diff --git a/tests/expand/st39-in.jsonld b/tests/expand/st39-in.jsonld deleted file mode 100644 index 9224a19..0000000 --- a/tests/expand/st39-in.jsonld +++ /dev/null @@ -1,15 +0,0 @@ -{ - "@context": { - "@vocab": "ex:", - "p1": {"@type": "@id"} - }, - "@id": "ex:s", - "p": { - "@id": "ex:o", - "@annotation": { - "r": { - "@id": {"@id": "ex:s1", "p1": "ex:o1"} - } - } - } -} \ No newline at end of file diff --git a/tests/expand/st39-out.jsonld b/tests/expand/st39-out.jsonld deleted file mode 100644 index fc64c6d..0000000 --- a/tests/expand/st39-out.jsonld +++ /dev/null @@ -1,14 +0,0 @@ -[{ - "@id": "ex:s", - "ex:p": [{ - "@id": "ex:o", - "@annotation": [{ - "ex:r": [{ - "@id": { - "@id": "ex:s1", - "ex:p1": [{"@id": "ex:o1"}] - } - }] - }] - }] -}] diff --git a/tests/flatten-manifest.jsonld b/tests/flatten-manifest.jsonld index 2d81e76..600d1ad 100644 --- a/tests/flatten-manifest.jsonld +++ b/tests/flatten-manifest.jsonld @@ -27,8 +27,8 @@ }, { "@id": "#tst04", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 1", - "purpose": "Node with embedded subject having no @id", + "name": "triple term 1", + "purpose": "Node with triple term having no @id", "input": "flatten/st04-in.jsonld", "expect": "flatten/st04-out.jsonld", "requires": "JSON-LD-star", @@ -36,8 +36,8 @@ }, { "@id": "#tst05", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 2", - "purpose": "Node with embedded subject having IRI @id", + "name": "triple term 2", + "purpose": "Node with triple term having IRI @id", "input": "flatten/st05-in.jsonld", "expect": "flatten/st05-out.jsonld", "requires": "JSON-LD-star", @@ -45,8 +45,8 @@ }, { "@id": "#tst06", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 3", - "purpose": "Node with embedded subject having BNode @id", + "name": "triple term 3", + "purpose": "Node with triple term having BNode @id", "input": "flatten/st06-in.jsonld", "expect": "flatten/st06-out.jsonld", "requires": "JSON-LD-star", @@ -54,8 +54,8 @@ }, { "@id": "#tst07", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 4", - "purpose": "Node with embedded subject having a type", + "name": "triple term 4", + "purpose": "Node with triple term having a type", "input": "flatten/st07-in.jsonld", "expect": "flatten/st07-out.jsonld", "requires": "JSON-LD-star", @@ -63,8 +63,8 @@ }, { "@id": "#tst08", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 5", - "purpose": "Node with embedded subject having an IRI value", + "name": "triple term 5", + "purpose": "Node with triple term having an IRI value", "input": "flatten/st08-in.jsonld", "expect": "flatten/st08-out.jsonld", "requires": "JSON-LD-star", @@ -72,8 +72,8 @@ }, { "@id": "#tst09", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 6", - "purpose": "Node with embedded subject having an BNode value", + "name": "triple term 6", + "purpose": "Node with triple term having an BNode value", "input": "flatten/st09-in.jsonld", "expect": "flatten/st09-out.jsonld", "requires": "JSON-LD-star", @@ -81,39 +81,12 @@ }, { "@id": "#tst10", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 7", - "purpose": "Node with recursive embedded subject", + "name": "triple term 7", + "purpose": "Node with recursive triple term", "input": "flatten/st10-in.jsonld", "expect": "flatten/st10-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst15", - "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 8", - "purpose": "Node with embedded object", - "input": "flatten/st15-in.jsonld", - "expect": "flatten/st15-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst16", - "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 9", - "purpose": "Node with embedded object having properties", - "input": "flatten/st16-in.jsonld", - "expect": "flatten/st16-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst17", - "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "embedded node 10", - "purpose": "Node with recursive embedded object", - "input": "flatten/st17-in.jsonld", - "expect": "flatten/st17-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst18", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], @@ -208,7 +181,7 @@ "@id": "#tst28", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], "name": "Embedded annotation node 1", - "purpose": "Node with @annotation property on embedded subject", + "purpose": "Node with @annotation property on triple term", "input": "flatten/st28-in.jsonld", "expect": "flatten/st28-out.jsonld", "requires": "JSON-LD-star", @@ -217,7 +190,7 @@ "@id": "#tst28n", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], "name": "Embedded annotation node 1 (with @annotation)", - "purpose": "Node with @annotation property on embedded subject", + "purpose": "Node with @annotation property on triple term", "input": "flatten/st28-in.jsonld", "expect": "flatten/st28n-out.jsonld", "requires": "JSON-LD-star", @@ -297,7 +270,7 @@ }, { "@id": "#tst36", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "Alias for embedded node", + "name": "Alias for triple term", "purpose": "embedded node with an alias of `@id`", "input": "flatten/st36-in.jsonld", "expect": "flatten/st36-out.jsonld", diff --git a/tests/flatten/st04-in.jsonld b/tests/flatten/st04-in.jsonld index 7299716..265b082 100644 --- a/tests/flatten/st04-in.jsonld +++ b/tests/flatten/st04-in.jsonld @@ -1,6 +1,8 @@ -{ - "@id": { - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file +[{ + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "ex:prop": [{"@value": "value"}] + } + }] +}] \ No newline at end of file diff --git a/tests/flatten/st04-out.jsonld b/tests/flatten/st04-out.jsonld index c39455f..265b082 100644 --- a/tests/flatten/st04-out.jsonld +++ b/tests/flatten/st04-out.jsonld @@ -1,6 +1,8 @@ [{ - "@id": { - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/flatten/st05-in.jsonld b/tests/flatten/st05-in.jsonld index 3dd38b3..79c8524 100644 --- a/tests/flatten/st05-in.jsonld +++ b/tests/flatten/st05-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/flatten/st05-out.jsonld b/tests/flatten/st05-out.jsonld index a57163c..a72e5ba 100644 --- a/tests/flatten/st05-out.jsonld +++ b/tests/flatten/st05-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/flatten/st06-in.jsonld b/tests/flatten/st06-in.jsonld index dadf48a..05ba93c 100644 --- a/tests/flatten/st06-in.jsonld +++ b/tests/flatten/st06-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "_:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "_:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/flatten/st06-out.jsonld b/tests/flatten/st06-out.jsonld index e10a93c..2febe30 100644 --- a/tests/flatten/st06-out.jsonld +++ b/tests/flatten/st06-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "_:b0", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "_:b0", + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/flatten/st07-in.jsonld b/tests/flatten/st07-in.jsonld index 7123c24..8c4dd90 100644 --- a/tests/flatten/st07-in.jsonld +++ b/tests/flatten/st07-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "@type": "ex:Type" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "@type": "ex:Type" + } + } +} diff --git a/tests/flatten/st07-out.jsonld b/tests/flatten/st07-out.jsonld index 41082df..db0b4f2 100644 --- a/tests/flatten/st07-out.jsonld +++ b/tests/flatten/st07-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "@type": ["ex:Type"] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "@type": ["ex:Type"] + } + }] }] \ No newline at end of file diff --git a/tests/flatten/st08-in.jsonld b/tests/flatten/st08-in.jsonld index c07dfed..a1f6525 100644 --- a/tests/flatten/st08-in.jsonld +++ b/tests/flatten/st08-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": {"@id": "ex:value"} + } + } +} diff --git a/tests/flatten/st08-out.jsonld b/tests/flatten/st08-out.jsonld index e04aaa9..54331cc 100644 --- a/tests/flatten/st08-out.jsonld +++ b/tests/flatten/st08-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }, - "ex:prop": [{"@value": "value2"}] - }] \ No newline at end of file + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@id": "ex:value"}] + } + }] +}] \ No newline at end of file diff --git a/tests/flatten/st09-in.jsonld b/tests/flatten/st09-in.jsonld index 8317fe1..3591fcf 100644 --- a/tests/flatten/st09-in.jsonld +++ b/tests/flatten/st09-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "_:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} + } + } +} diff --git a/tests/flatten/st09-out.jsonld b/tests/flatten/st09-out.jsonld index 38869bf..b76f3c8 100644 --- a/tests/flatten/st09-out.jsonld +++ b/tests/flatten/st09-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "_:b0"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@id": "_:b0"}] + } + }] }] \ No newline at end of file diff --git a/tests/flatten/st10-in.jsonld b/tests/flatten/st10-in.jsonld index 87bbd97..fecc2ca 100644 --- a/tests/flatten/st10-in.jsonld +++ b/tests/flatten/st10-in.jsonld @@ -1,10 +1,15 @@ { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value3" - }, - "ex:prop": "value" - }, - "ex:prop": "value2" + "@context": {"ex": "http://example/"}, + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:s1", + "ex:p1": { + "@triple": { + "@id": "ex:s2", + "ex:p2": {"@id": "ex:o2"} + } + } + } + } } \ No newline at end of file diff --git a/tests/flatten/st10-out.jsonld b/tests/flatten/st10-out.jsonld index d9997e2..c1e34f9 100644 --- a/tests/flatten/st10-out.jsonld +++ b/tests/flatten/st10-out.jsonld @@ -1,10 +1,14 @@ [{ - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "http://example/s", + "http://example/p": [{ + "@triple": { + "@id": "http://example/s1", + "http://example/p1": [{ + "@triple": { + "@id": "http://example/s2", + "http://example/p2": [{"@id": "http://example/o2"}] + } + }] + } + }] }] \ No newline at end of file diff --git a/tests/flatten/st15-in.jsonld b/tests/flatten/st15-in.jsonld deleted file mode 100644 index e041305..0000000 --- a/tests/flatten/st15-in.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - } - } -} \ No newline at end of file diff --git a/tests/flatten/st15-out.jsonld b/tests/flatten/st15-out.jsonld deleted file mode 100644 index 63dc83d..0000000 --- a/tests/flatten/st15-out.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - } - }] - }] \ No newline at end of file diff --git a/tests/flatten/st16-in.jsonld b/tests/flatten/st16-in.jsonld deleted file mode 100644 index a71537f..0000000 --- a/tests/flatten/st16-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" - } -} \ No newline at end of file diff --git a/tests/flatten/st16-out.jsonld b/tests/flatten/st16-out.jsonld deleted file mode 100644 index 87c673f..0000000 --- a/tests/flatten/st16-out.jsonld +++ /dev/null @@ -1,15 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - } - }] -}, { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] -}] \ No newline at end of file diff --git a/tests/flatten/st17-in.jsonld b/tests/flatten/st17-in.jsonld deleted file mode 100644 index acf24c7..0000000 --- a/tests/flatten/st17-in.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value3" - }, - "ex:prop": "value" - }, - "ex:prop": "value2" - } -} \ No newline at end of file diff --git a/tests/flatten/st17-out.jsonld b/tests/flatten/st17-out.jsonld deleted file mode 100644 index 16b61bc..0000000 --- a/tests/flatten/st17-out.jsonld +++ /dev/null @@ -1,21 +0,0 @@ -[{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop":[{"@value": "value"}] - } - }] -}, { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop":[{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] -}] \ No newline at end of file diff --git a/tests/flatten/st18-out.jsonld b/tests/flatten/st18-out.jsonld index 04a528b..40fd184 100644 --- a/tests/flatten/st18-out.jsonld +++ b/tests/flatten/st18-out.jsonld @@ -2,9 +2,9 @@ "@id": "ex:bob", "ex:age": [{"@value": 23}] }, { - "@id": { - "@id": "ex:bob", - "ex:age": [{"@value": 23}] - }, + "@id": "_:b1", + "@reifies": [{ + "@id": "ex:bob", "ex:age": [{"@value": 23}] + }], "ex:certainty": [{"@value": 0.8}] }] \ No newline at end of file diff --git a/tests/flatten/st18n-out.jsonld b/tests/flatten/st18n-out.jsonld index 1cf2425..d2e439f 100644 --- a/tests/flatten/st18n-out.jsonld +++ b/tests/flatten/st18n-out.jsonld @@ -3,6 +3,7 @@ "ex:age": [{ "@value": 23, "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{"@value": 0.8}] }] }] diff --git a/tests/flatten/st19-out.jsonld b/tests/flatten/st19-out.jsonld index 7dddba7..0cfd598 100644 --- a/tests/flatten/st19-out.jsonld +++ b/tests/flatten/st19-out.jsonld @@ -6,9 +6,9 @@ "@id": "ex:fred", "ex:name": [{"@value": "Fred"}] }, { - "@id": { - "@id": "ex:bob", - "ex:knows": [{"@id": "ex:fred"}] - }, + "@id":"_:b1", + "@reifies": [{ + "@id": "ex:bob", "ex:knows": [{"@id": "ex:fred"}] + }], "ex:certainty": [{"@value": 0.8}] -}] \ No newline at end of file +}] diff --git a/tests/flatten/st20-out.jsonld b/tests/flatten/st20-out.jsonld index b5d8806..9dfad55 100644 --- a/tests/flatten/st20-out.jsonld +++ b/tests/flatten/st20-out.jsonld @@ -6,10 +6,15 @@ "@id": "ex:fred", "ex:name": [{"@value": "Fred"}] }, { - "@id": { - "@id": "ex:bob", - "ex:knows": [{"@id": "ex:fred"}] - }, - "ex:certainty": [{"@value": 0.8}], + "@id": "_:b1", + "@reifies": [{ + "@id": "ex:bob", "ex:knows": [{"@id": "ex:fred"}] + }], + "ex:certainty": [{"@value": 0.8}] +}, { + "@id": "_:b3", + "@reifies": [{ + "@id": "ex:bob", "ex:knows": [{"@id": "ex:fred"}] + }], "ex:source": [{"@id": "http://example.org/"}] }] \ No newline at end of file diff --git a/tests/flatten/st20a-out.jsonld b/tests/flatten/st20a-out.jsonld index fe9bb51..78ca97b 100644 --- a/tests/flatten/st20a-out.jsonld +++ b/tests/flatten/st20a-out.jsonld @@ -6,12 +6,9 @@ { "@id": "ex:fred", "ex:name": [{"@value": "Fred"}] -}, -{ - "@id": { - "@id": "ex:bob", - "ex:knows": [{"@id": "ex:fred"}] - }, +}, { + "@id": "_:b1", + "@reifies": [{"@id": "ex:bob", "ex:knows": [{"@id": "ex:fred"}]}], "ex:certainty": [{"@value": 0.8}], "ex:source": [{"@id": "http://example.org/"}] }] diff --git a/tests/flatten/st20an-out.jsonld b/tests/flatten/st20an-out.jsonld index 3844059..046361f 100644 --- a/tests/flatten/st20an-out.jsonld +++ b/tests/flatten/st20an-out.jsonld @@ -4,6 +4,7 @@ "ex:knows": [{ "@id": "ex:fred", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{"@value": 0.8}], "ex:source": [{"@id": "http://example.org/"}] }] diff --git a/tests/flatten/st20b-out.jsonld b/tests/flatten/st20b-out.jsonld index fe07bb5..bebd761 100644 --- a/tests/flatten/st20b-out.jsonld +++ b/tests/flatten/st20b-out.jsonld @@ -6,4 +6,7 @@ { "@id": "ex:fred", "ex:name": [{"@value": "Fred"}] +}, { + "@id": "_:b1", + "@reifies": [{"@id": "ex:bob", "ex:knows": [{"@id": "ex:fred"}]}] }] \ No newline at end of file diff --git a/tests/flatten/st20n-out.jsonld b/tests/flatten/st20n-out.jsonld index 5d72441..fe15a95 100644 --- a/tests/flatten/st20n-out.jsonld +++ b/tests/flatten/st20n-out.jsonld @@ -4,6 +4,7 @@ "ex:knows": [{ "@id": "ex:fred", "@annotation": [{ + "@id": "_:bn1", "ex:certainty": [{"@value": 0.8}], "ex:source": [{"@id": "http://example.org/"}] }] diff --git a/tests/flatten/st28-in.jsonld b/tests/flatten/st28-in.jsonld index 64f037b..b066032 100644 --- a/tests/flatten/st28-in.jsonld +++ b/tests/flatten/st28-in.jsonld @@ -1,5 +1,6 @@ { - "@id": { + "@id": "_:rei", + "@reifies": { "@id": "ex:rei", "ex:prop": {"@id": "_:value"} }, diff --git a/tests/flatten/st28-out.jsonld b/tests/flatten/st28-out.jsonld index 6c4473a..36b15a2 100644 --- a/tests/flatten/st28-out.jsonld +++ b/tests/flatten/st28-out.jsonld @@ -1,16 +1,12 @@ [{ - "@id": { + "@id": "_:b2", + "@reifies": [{ "@id": "ex:rei", - "ex:prop": [{"@id": "_:b0"}] - }, + "ex:prop": [{"@id": "_:b1"}] + }], "ex:prop": [{"@value": "value2"}] }, { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "_:b0"}] - }, - "ex:prop": [{"@value": "value2"}] - }, + "@id": "_:b4", + "@reifies": [{"@id": "_:b2", "ex:prop": [{"@value": "value2"}]}], "ex:certainty": [{"@value": 0.8}] }] \ No newline at end of file diff --git a/tests/flatten/st28n-out.jsonld b/tests/flatten/st28n-out.jsonld index b79af13..6adf144 100644 --- a/tests/flatten/st28n-out.jsonld +++ b/tests/flatten/st28n-out.jsonld @@ -1,11 +1,13 @@ [{ - "@id": { + "@id": "_:rei", + "@reifies": { "@id": "ex:rei", "ex:prop": [{"@id": "_:b0"}] }, "ex:prop": [{ "@value": "value2", "@annotation": [{ + "@id": "_:bn1", "ex:certainty": [{"@value": 0.8}] }] }] diff --git a/tests/flatten/st29-in.jsonld b/tests/flatten/st29-in.jsonld index 5597b3d..2d2d03f 100644 --- a/tests/flatten/st29-in.jsonld +++ b/tests/flatten/st29-in.jsonld @@ -1,7 +1,7 @@ { "@id": "ex:subj", "ex:value": { - "@id": { + "@reifies": { "@id": "ex:rei", "ex:prop": "value" }, diff --git a/tests/flatten/st29-out.jsonld b/tests/flatten/st29-out.jsonld index d57a119..565bba1 100644 --- a/tests/flatten/st29-out.jsonld +++ b/tests/flatten/st29-out.jsonld @@ -1,20 +1,17 @@ [{ "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - } + "ex:value": [{"@id": "_:b0"}] +}, { + "@id": "_:b0", + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] }] }, { - "@id": { + "@id": "_:b2", + "@reifies": [{ "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - } - }] - }, + "ex:value": [{"@id": "_:b0"}] + }], "ex:certainty": [{"@value": 0.8}] }] \ No newline at end of file diff --git a/tests/flatten/st29n-out.jsonld b/tests/flatten/st29n-out.jsonld index 61ae191..68287ad 100644 --- a/tests/flatten/st29n-out.jsonld +++ b/tests/flatten/st29n-out.jsonld @@ -1,6 +1,7 @@ [{ "@id": "ex:subj", - "ex:value": [{ + "ex:value": [{"@id": "_:bn0"}] +}, { "@id": { "@id": "ex:rei", "ex:prop": [{"@value": "value"}] diff --git a/tests/flatten/st32-in.jsonld b/tests/flatten/st32-in.jsonld index a1689ec..c07c056 100644 --- a/tests/flatten/st32-in.jsonld +++ b/tests/flatten/st32-in.jsonld @@ -2,7 +2,7 @@ "@context": { "rel": {"@reverse": "ex:rel"} }, - "@id": { + "@reifies": { "@id": "ex:rei", "ex:prop": {"@id": "ex:value"} }, diff --git a/tests/flatten/st32-out.jsonld b/tests/flatten/st32-out.jsonld index 8edbbbe..c53f2d2 100644 --- a/tests/flatten/st32-out.jsonld +++ b/tests/flatten/st32-out.jsonld @@ -1,9 +1,10 @@ [{ - "@id": "ex:value2", - "ex:rel": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - } + "@id": "_:b0", + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@id": "ex:value"}] }] -}] \ No newline at end of file +}, { + "@id": "ex:value2", + "ex:rel": [{"@id": "_:b0"}] +}] diff --git a/tests/flatten/st33-in.jsonld b/tests/flatten/st33-in.jsonld index 90b80c6..755275f 100644 --- a/tests/flatten/st33-in.jsonld +++ b/tests/flatten/st33-in.jsonld @@ -4,10 +4,11 @@ }, "@id": "ex:subj", "rel": { - "@id": { + "@reifies": { "@id": "ex:rei", "ex:prop": {"@id": "ex:value"} }, "ex:prop": {"@id": "ex:value2"} - } + }, + "ex:prop": {"@id": "ex:value3"} } \ No newline at end of file diff --git a/tests/flatten/st33-out.jsonld b/tests/flatten/st33-out.jsonld index 49cc333..eae0afe 100644 --- a/tests/flatten/st33-out.jsonld +++ b/tests/flatten/st33-out.jsonld @@ -1,8 +1,12 @@ [{ - "@id": { + "@id": "_:b0", + "ex:rel": [{"@id": "ex:subj"}], + "@reifies": [{ "@id": "ex:rei", "ex:prop": [{"@id": "ex:value"}] - }, - "ex:rel": [{"@id": "ex:subj"}], + }], "ex:prop": [{"@id": "ex:value2"}] +}, { + "@id": "ex:subj", + "ex:prop": [{"@id": "ex:value3"}] }] \ No newline at end of file diff --git a/tests/flatten/st34-out.jsonld b/tests/flatten/st34-out.jsonld index 1ac08d2..2962006 100644 --- a/tests/flatten/st34-out.jsonld +++ b/tests/flatten/st34-out.jsonld @@ -1,14 +1,15 @@ [{ "@id": "ex:bob", "ex:name": [{"@value": "Bob"}] +}, {"@id": "ex:fred", + "ex:knows": [{"@id": "ex:bob"}], + "ex:name": [{"@value": "Fred"}] }, { - "@id": "ex:fred", - "ex:name": [{"@value": "Fred"}], - "ex:knows": [{"@id": "ex:bob"}] -}, { - "@id": { - "@id": "ex:fred", - "ex:knows": [{"@id": "ex:bob"}] - }, + "@id": "_:b1", + "@reifies": [{ + "@id": "ex:bob", + "ex:knows": [{"@id": "ex:fred"}] + }], "ex:certainty": [{"@value": 0.8}] -}] \ No newline at end of file +} +] \ No newline at end of file diff --git a/tests/flatten/st35-out.jsonld b/tests/flatten/st35-out.jsonld index 7f3d3bd..d527f14 100644 --- a/tests/flatten/st35-out.jsonld +++ b/tests/flatten/st35-out.jsonld @@ -2,17 +2,13 @@ "@id": "ex:bob", "ex:knows": [{"@id": "ex:jane"}] }, { - "@id": { + "@id": "_:b1", + "@reifies": [{ "@id": "ex:bob", "ex:knows": [{"@id": "ex:jane"}] - }, + }], "ex:certainty": [{"@value": 0.8}] }, { "@id": "ex:sue", - "ex:claims": [{ - "@id": { - "@id": "ex:bob", - "ex:knows": [{"@id": "ex:jane"}] - } - }] + "ex:claims": [{"@id": "_:b1"}] }] \ No newline at end of file diff --git a/tests/flatten/st36-in.jsonld b/tests/flatten/st36-in.jsonld index 8446b13..faec9c0 100644 --- a/tests/flatten/st36-in.jsonld +++ b/tests/flatten/st36-in.jsonld @@ -1,9 +1,8 @@ { "@context": { - "triple": "@id" - }, - "triple": { - "ex:prop": "value" + "triple": "@triple" }, + "@id": "ex:subj", + "ex:reifies": {"triple": {"ex:prop": "value"}}, "ex:prop": "value2" } \ No newline at end of file diff --git a/tests/flatten/st36-out.jsonld b/tests/flatten/st36-out.jsonld index c39455f..744e615 100644 --- a/tests/flatten/st36-out.jsonld +++ b/tests/flatten/st36-out.jsonld @@ -1,6 +1,9 @@ [{ - "@id": { - "ex:prop": [{"@value": "value"}] - }, + "@id": "ex:subj", + "ex:reifies": [{ + "@triple": { + "ex:prop": [{"@value": "value"}] + } + }], "ex:prop": [{"@value": "value2"}] }] \ No newline at end of file diff --git a/tests/flatten/st37-out.jsonld b/tests/flatten/st37-out.jsonld index 54ac44e..3276e75 100644 --- a/tests/flatten/st37-out.jsonld +++ b/tests/flatten/st37-out.jsonld @@ -1,11 +1,11 @@ [{ "@id": "ex:bob", "ex:age": [{"@value": 23}] -}, -{ - "@id": { +}, { + "@id": "_:b1", + "@reifies": [{ "@id": "ex:bob", "ex:age": [{"@value": 23}] - }, + }], "ex:certainty": [{"@value": 0.8}] }] \ No newline at end of file diff --git a/tests/flatten/st38-in.jsonld b/tests/flatten/st38-in.jsonld index e07a2e3..2bc89d7 100644 --- a/tests/flatten/st38-in.jsonld +++ b/tests/flatten/st38-in.jsonld @@ -4,7 +4,8 @@ "@vocab": "http://example.org/", "claims": {"@type": "@id"} }, - "@id": { + "@id": "reif", + "@reifies": { "@id": "bob", "knows": {"@id": "alice"} }, diff --git a/tests/flatten/st38-out.jsonld b/tests/flatten/st38-out.jsonld index 7312c4a..b20a432 100644 --- a/tests/flatten/st38-out.jsonld +++ b/tests/flatten/st38-out.jsonld @@ -1,16 +1,16 @@ [{ - "@id": { + "@id": "http://example.org/reif", + "@reifies": [{ "@id": "http://example.org/bob", "http://example.org/knows": [{"@id": "http://example.org/alice"}] - }, + }], "http://example.org/certainty": [{"@value": 0.8}] }, { - "@id": { - "@id": { - "@id": "http://example.org/bob", - "http://example.org/knows": [{"@id": "http://example.org/alice"}] - }, - "http://example.org/certainty": [{"@value": 0.8}] - }, + "@id": "_:b1", + "@reifies": [{ + "@id": "http://example.org/reif", + "http://example.org/certainty": [{"@value": 0.8}] + } + ], "http://example.org/claims": [{"@id": "http://example.org/ted"}] }] \ No newline at end of file diff --git a/tests/flatten/st39-in.jsonld b/tests/flatten/st39-in.jsonld index 9224a19..b22137a 100644 --- a/tests/flatten/st39-in.jsonld +++ b/tests/flatten/st39-in.jsonld @@ -8,7 +8,7 @@ "@id": "ex:o", "@annotation": { "r": { - "@id": {"@id": "ex:s1", "p1": "ex:o1"} + "@reifies": {"@id": "ex:s1", "p1": "ex:o1"} } } } diff --git a/tests/flatten/st39-out.jsonld b/tests/flatten/st39-out.jsonld index 34ead85..6f677e4 100644 --- a/tests/flatten/st39-out.jsonld +++ b/tests/flatten/st39-out.jsonld @@ -2,14 +2,10 @@ "@id": "ex:s", "ex:p": [{"@id": "ex:o"}] }, { - "@id": { - "@id": "ex:s", - "ex:p": [{"@id": "ex:o"}] - }, - "ex:r": [{ - "@id": { - "@id": "ex:s1", - "ex:p1": [{"@id": "ex:o1"}] - } - }] -}] + "@id": "_:b1", + "@reifies": [{"@id": "ex:s", "ex:p": [{"@id": "ex:o"}]}], + "ex:r": [{"@id": "_:b2"}] +}, { + "@id": "_:b2", + "@reifies": [{"@id": "ex:s1", "ex:p1": [{"@id": "ex:o1"}]}] +}] \ No newline at end of file diff --git a/tests/flatten/st40-out.jsonld b/tests/flatten/st40-out.jsonld index 83f9f45..ccb8441 100644 --- a/tests/flatten/st40-out.jsonld +++ b/tests/flatten/st40-out.jsonld @@ -2,18 +2,11 @@ "@id": "ex:s", "ex:p": [{"@id": "ex:o"}] }, { - "@id": { - "@id": "ex:s", - "ex:p": [{"@id": "ex:o"}] - }, + "@id": "_:b1", + "@reifies": [{"@id": "ex:s", "ex:p": [{"@id": "ex:o"}]}], "ex:r": [{"@id": "ex:s1"}] }, { - "@id": { - "@id": { - "@id": "ex:s", - "ex:p": [{"@id": "ex:o"}] - }, - "ex:r": [{"@id": "ex:s1"}] - }, + "@id": "_:b3", + "@reifies": [{"@id": "_:b1", "ex:r": [{"@id": "ex:s1"}]}], "ex:p1": [{"@id": "ex:o1"}] }] diff --git a/tests/fromRdf-manifest.jsonld b/tests/fromRdf-manifest.jsonld index 8d585f5..c2ac49e 100644 --- a/tests/fromRdf-manifest.jsonld +++ b/tests/fromRdf-manifest.jsonld @@ -7,28 +7,10 @@ "baseIri": "https://w3c.github.io/json-ld-api/tests/", "sequence": [ { - "@id": "#tst02", - "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "ignored annotation 1", - "purpose": "Node object with @annotation property is ignored without rdfstar option.", - "input": "fromRdf/st02-in.nq", - "expect": "fromRdf/st02-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": false} - }, { - "@id": "#tst03", - "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "ignored annotation 2", - "purpose": "Value object with @annotation property is ignored without rdfstar option", - "input": "fromRdf/st03-in.nq", - "expect": "fromRdf/st03-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": false} - }, { "@id": "#tst04", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 1", - "purpose": "Node with embedded subject having no @id", + "name": "triple term 1", + "purpose": "Node with triple term having no @id", "input": "fromRdf/st04-in.nq", "expect": "fromRdf/st04-out.jsonld", "requires": "JSON-LD-star", @@ -36,8 +18,8 @@ }, { "@id": "#tst05", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 2", - "purpose": "Node with embedded subject having IRI @id", + "name": "triple term 2", + "purpose": "Node with triple term having IRI @id", "input": "fromRdf/st05-in.nq", "expect": "fromRdf/st05-out.jsonld", "requires": "JSON-LD-star", @@ -45,8 +27,8 @@ }, { "@id": "#tst06", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 3", - "purpose": "Node with embedded subject having BNode @id", + "name": "triple term 3", + "purpose": "Node with triple term having BNode @id", "input": "fromRdf/st06-in.nq", "expect": "fromRdf/st06-out.jsonld", "requires": "JSON-LD-star", @@ -54,8 +36,8 @@ }, { "@id": "#tst07", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 4", - "purpose": "Node with embedded subject having a type", + "name": "triple term 4", + "purpose": "Node with triple term having a type", "input": "fromRdf/st07-in.nq", "expect": "fromRdf/st07-out.jsonld", "requires": "JSON-LD-star", @@ -63,8 +45,8 @@ }, { "@id": "#tst08", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 5", - "purpose": "Node with embedded subject having an IRI value", + "name": "triple term 5", + "purpose": "Node with triple term having an IRI value", "input": "fromRdf/st08-in.nq", "expect": "fromRdf/st08-out.jsonld", "requires": "JSON-LD-star", @@ -72,8 +54,8 @@ }, { "@id": "#tst09", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 6", - "purpose": "Node with embedded subject having an BNode value", + "name": "triple term 6", + "purpose": "Node with triple term having an BNode value", "input": "fromRdf/st09-in.nq", "expect": "fromRdf/st09-out.jsonld", "requires": "JSON-LD-star", @@ -81,8 +63,8 @@ }, { "@id": "#tst10", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 7", - "purpose": "Node with recursive embedded subject", + "name": "triple term 7", + "purpose": "Node with recursive triple term", "input": "fromRdf/st10-in.nq", "expect": "fromRdf/st10-out.jsonld", "requires": "JSON-LD-star", @@ -90,8 +72,8 @@ }, { "@id": "#tst15", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 8", - "purpose": "Node with embedded object", + "name": "reification 8", + "purpose": "Node with reified triple", "input": "fromRdf/st15-in.nq", "expect": "fromRdf/st15-out.jsonld", "requires": "JSON-LD-star", @@ -99,8 +81,8 @@ }, { "@id": "#tst16", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 9", - "purpose": "Node with embedded object having properties", + "name": "reification 9", + "purpose": "Node with reified triple having properties", "input": "fromRdf/st16-in.nq", "expect": "fromRdf/st16-out.jsonld", "requires": "JSON-LD-star", @@ -108,8 +90,8 @@ }, { "@id": "#tst17", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 10", - "purpose": "Node with recursive embedded object", + "name": "reification 10", + "purpose": "Node with recursive reification", "input": "fromRdf/st17-in.nq", "expect": "fromRdf/st17-out.jsonld", "requires": "JSON-LD-star", @@ -117,7 +99,7 @@ }, { "@id": "#tst18", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Annotation node 1", + "name": "Annotation node 1 (with @annotation)", "purpose": "Node with @annotation property on value object", "input": "fromRdf/st18-in.nq", "expect": "fromRdf/st18-out.jsonld", @@ -126,7 +108,7 @@ }, { "@id": "#tst19", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Annotation node 2", + "name": "Annotation node 2 (with @annotation)", "purpose": "Node with @annotation property on node object", "input": "fromRdf/st19-in.nq", "expect": "fromRdf/st19-out.jsonld", @@ -135,7 +117,7 @@ }, { "@id": "#tst20", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Annotation node 3", + "name": "Annotation node 3 (with @annotation)", "purpose": "Node with @annotation property multiple values", "input": "fromRdf/st20-in.nq", "expect": "fromRdf/st20-out.jsonld", @@ -144,25 +126,16 @@ }, { "@id": "#tst20a", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Annotation node 4", + "name": "Annotation node 4 (with @annotation)", "purpose": "Node with @annotation property containing multiple properties", "input": "fromRdf/st20a-in.nq", "expect": "fromRdf/st20a-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst20b", - "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Annotation node 5", - "purpose": "Node with @annotation property containing an empty node object", - "input": "fromRdf/st20b-in.nq", - "expect": "fromRdf/st20b-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst28", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Embedded annotation node 1", + "name": "Embedded annotation node 1 (with @annotation)", "purpose": "Node with @annotation property on embedded subject", "input": "fromRdf/st28-in.nq", "expect": "fromRdf/st28-out.jsonld", @@ -171,26 +144,17 @@ }, { "@id": "#tst29", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Embedded annotation node 1", + "name": "Embedded annotation node 2 (with @annotation)", "purpose": "Node with @annotation property on embedded object", "input": "fromRdf/st29-in.nq", "expect": "fromRdf/st29-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst32", - "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 13", - "purpose": "Embedded node used as subject in reverse relationship", - "input": "fromRdf/st32-in.nq", - "expect": "fromRdf/st32-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst33", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "embedded node 14", - "purpose": "Embedded node used as object in reverse relationship", + "name": "reification 14", + "purpose": "Reification used as object in reverse relationship", "input": "fromRdf/st33-in.nq", "expect": "fromRdf/st33-out.jsonld", "requires": "JSON-LD-star", @@ -198,7 +162,7 @@ }, { "@id": "#tst34", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Reverse annotation node 1", + "name": "Reverse annotation node 1 (with @annotation)", "purpose": "node with @annotation property on node object with reverse relationship", "input": "fromRdf/st34-in.nq", "expect": "fromRdf/st34-out.jsonld", @@ -207,7 +171,7 @@ }, { "@id": "#tst35", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Reverse annotation node 2", + "name": "Reverse annotation node 2 (with @annotation)", "purpose": "reverse relationship inside annotation", "input": "fromRdf/st35-in.nq", "expect": "fromRdf/st35-out.jsonld", @@ -225,7 +189,7 @@ }, { "@id": "#tst37", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Alias for annotation node", + "name": "Alias for annotation node (with @annotation)", "purpose": "annotation node with an alias of `@annotation`", "input": "fromRdf/st37-in.nq", "expect": "fromRdf/st37-out.jsonld", @@ -234,7 +198,7 @@ }, { "@id": "#tst38", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "annotation value 1", + "name": "annotation value 1 (with @annotation)", "purpose": "embedded node with annotation on value object", "input": "fromRdf/st38-in.nq", "expect": "fromRdf/st38-out.jsonld", @@ -243,7 +207,7 @@ }, { "@id": "#tst39", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "annotation with embedded node 1", + "name": "annotation with embedded node 1 (with @annotation)", "purpose": "annotation node containing an embedded node", "input": "fromRdf/st39-in.nq", "expect": "fromRdf/st39-out.jsonld", @@ -252,7 +216,7 @@ }, { "@id": "#tst40", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "annotation with annotation 1", + "name": "annotation with annotation 1 (with @annotation)", "purpose": "annotation node containing an annotation node", "input": "fromRdf/st40-in.nq", "expect": "fromRdf/st40-out.jsonld", diff --git a/tests/fromRdf/st02-in.nq b/tests/fromRdf/st02-in.nq deleted file mode 100644 index c16f384..0000000 --- a/tests/fromRdf/st02-in.nq +++ /dev/null @@ -1 +0,0 @@ - . diff --git a/tests/fromRdf/st02-out.jsonld b/tests/fromRdf/st02-out.jsonld deleted file mode 100644 index 806a21a..0000000 --- a/tests/fromRdf/st02-out.jsonld +++ /dev/null @@ -1,6 +0,0 @@ -[{ - "@id": "ex:bob", - "ex:knows": [{ - "@id": "ex:fred" - }] -}] \ No newline at end of file diff --git a/tests/fromRdf/st03-in.nq b/tests/fromRdf/st03-in.nq deleted file mode 100644 index 7b7f58b..0000000 --- a/tests/fromRdf/st03-in.nq +++ /dev/null @@ -1 +0,0 @@ - "23"^^ . diff --git a/tests/fromRdf/st03-out.jsonld b/tests/fromRdf/st03-out.jsonld deleted file mode 100644 index 2020958..0000000 --- a/tests/fromRdf/st03-out.jsonld +++ /dev/null @@ -1,7 +0,0 @@ -[{ - "@id": "ex:bob", - "ex:age": [{ - "@value": "23", - "@type": "http://www.w3.org/2001/XMLSchema#integer" - }] -}] \ No newline at end of file diff --git a/tests/fromRdf/st04-in.nq b/tests/fromRdf/st04-in.nq index f2b875f..130c1d4 100644 --- a/tests/fromRdf/st04-in.nq +++ b/tests/fromRdf/st04-in.nq @@ -1 +1 @@ -<<_:b0 "value">> "value2" . + <<(_:b0 "value")>> . diff --git a/tests/fromRdf/st04-out.jsonld b/tests/fromRdf/st04-out.jsonld index e10a93c..2febe30 100644 --- a/tests/fromRdf/st04-out.jsonld +++ b/tests/fromRdf/st04-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "_:b0", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "_:b0", + "ex:prop": [{"@value": "value"}] + } + }] }] \ No newline at end of file diff --git a/tests/fromRdf/st05-in.nq b/tests/fromRdf/st05-in.nq index ae59adb..03a19d7 100644 --- a/tests/fromRdf/st05-in.nq +++ b/tests/fromRdf/st05-in.nq @@ -1 +1 @@ -<< "value">> "value2" . + <<( "value")>> . diff --git a/tests/fromRdf/st05-out.jsonld b/tests/fromRdf/st05-out.jsonld index ba51da9..a72e5ba 100644 --- a/tests/fromRdf/st05-out.jsonld +++ b/tests/fromRdf/st05-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] -}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + } + }] +}] \ No newline at end of file diff --git a/tests/fromRdf/st06-in.nq b/tests/fromRdf/st06-in.nq index 2cb7936..2cfc169 100644 --- a/tests/fromRdf/st06-in.nq +++ b/tests/fromRdf/st06-in.nq @@ -1 +1 @@ -<<_:rei "value">> "value2" . + <<(_:rei "value")>> . diff --git a/tests/fromRdf/st06-out.jsonld b/tests/fromRdf/st06-out.jsonld index 1b6de9f..1bf5ad0 100644 --- a/tests/fromRdf/st06-out.jsonld +++ b/tests/fromRdf/st06-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "_:rei", - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] -}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "_:rei", + "ex:prop": [{"@value": "value"}] + } + }] +}] \ No newline at end of file diff --git a/tests/fromRdf/st07-in.nq b/tests/fromRdf/st07-in.nq index bc66c5b..33fdf6c 100644 --- a/tests/fromRdf/st07-in.nq +++ b/tests/fromRdf/st07-in.nq @@ -1 +1 @@ -<< >> "value2" . + <<( )>> . diff --git a/tests/fromRdf/st07-out.jsonld b/tests/fromRdf/st07-out.jsonld index 7a27dce..17a3bf4 100644 --- a/tests/fromRdf/st07-out.jsonld +++ b/tests/fromRdf/st07-out.jsonld @@ -1,7 +1,4 @@ [{ - "@id": { - "@id": "ex:rei", - "@type": "ex:Type" - }, - "ex:prop": [{"@value": "value2"}] + "@id": "ex:s", + "ex:p": [{"@triple": {"@id": "ex:rei", "@type": "ex:Type"}}] }] diff --git a/tests/fromRdf/st08-in.nq b/tests/fromRdf/st08-in.nq index dda1e90..6933747 100644 --- a/tests/fromRdf/st08-in.nq +++ b/tests/fromRdf/st08-in.nq @@ -1 +1 @@ -<< >> "value2" . + <<( )>> . diff --git a/tests/fromRdf/st08-out.jsonld b/tests/fromRdf/st08-out.jsonld index a023887..54331cc 100644 --- a/tests/fromRdf/st08-out.jsonld +++ b/tests/fromRdf/st08-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }, - "ex:prop": [{"@value": "value2"}] -}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@id": "ex:value"}] + } + }] +}] \ No newline at end of file diff --git a/tests/fromRdf/st09-in.nq b/tests/fromRdf/st09-in.nq index 9ba5549..ca4a1d7 100644 --- a/tests/fromRdf/st09-in.nq +++ b/tests/fromRdf/st09-in.nq @@ -1 +1 @@ -<< _:value>> "value2" . + <<( _:value)>> . diff --git a/tests/fromRdf/st09-out.jsonld b/tests/fromRdf/st09-out.jsonld index 14aa5cb..937a07e 100644 --- a/tests/fromRdf/st09-out.jsonld +++ b/tests/fromRdf/st09-out.jsonld @@ -1,7 +1,9 @@ [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@id": "_:value"}] - }, - "ex:prop": [{"@value": "value2"}] -}] + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@id": "_:value"}] + } + }] +}] \ No newline at end of file diff --git a/tests/fromRdf/st10-in.nq b/tests/fromRdf/st10-in.nq index f4797c0..96aece1 100644 --- a/tests/fromRdf/st10-in.nq +++ b/tests/fromRdf/st10-in.nq @@ -1 +1 @@ -<<<< "value3">> "value">> "value2" . + <<( <<( )>>)>> . diff --git a/tests/fromRdf/st10-out.jsonld b/tests/fromRdf/st10-out.jsonld index ad2dd1f..c1e34f9 100644 --- a/tests/fromRdf/st10-out.jsonld +++ b/tests/fromRdf/st10-out.jsonld @@ -1,10 +1,14 @@ [{ - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop": [{"@value": "value"}] - }, - "ex:prop": [{"@value": "value2"}] -}] + "@id": "http://example/s", + "http://example/p": [{ + "@triple": { + "@id": "http://example/s1", + "http://example/p1": [{ + "@triple": { + "@id": "http://example/s2", + "http://example/p2": [{"@id": "http://example/o2"}] + } + }] + } + }] +}] \ No newline at end of file diff --git a/tests/fromRdf/st15-in.nq b/tests/fromRdf/st15-in.nq index 14f9f0c..e397d5b 100644 --- a/tests/fromRdf/st15-in.nq +++ b/tests/fromRdf/st15-in.nq @@ -1 +1,2 @@ - << "value">> . + _:bn1 . +_:bn1 <<( "value")>> . diff --git a/tests/fromRdf/st15-out.jsonld b/tests/fromRdf/st15-out.jsonld index 6d72673..ea58537 100644 --- a/tests/fromRdf/st15-out.jsonld +++ b/tests/fromRdf/st15-out.jsonld @@ -1,9 +1,7 @@ [{ "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - } - }] + "ex:value": [{"@id": "_:bn1"}] +}, { + "@id": "_:bn1", + "@reifies": [{"@id": "ex:rei", "ex:prop": [{"@value": "value"}]}] }] diff --git a/tests/fromRdf/st16-in.nq b/tests/fromRdf/st16-in.nq index 46b8edc..c61d337 100644 --- a/tests/fromRdf/st16-in.nq +++ b/tests/fromRdf/st16-in.nq @@ -1,2 +1,3 @@ - << "value">> . -<< "value">> "value2" . + _:bn1 . +_:bn1 <<( "value")>> . +_:bn1 "value2" . diff --git a/tests/fromRdf/st16-out.jsonld b/tests/fromRdf/st16-out.jsonld index 87c673f..964a8ee 100644 --- a/tests/fromRdf/st16-out.jsonld +++ b/tests/fromRdf/st16-out.jsonld @@ -1,15 +1,11 @@ [{ "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - } - }] + "ex:value": [{"@id": "_:bn1"}] }, { - "@id": { + "@id": "_:bn1", + "@reifies": [{ "@id": "ex:rei", "ex:prop": [{"@value": "value"}] - }, + }], "ex:prop": [{"@value": "value2"}] }] \ No newline at end of file diff --git a/tests/fromRdf/st17-in.nq b/tests/fromRdf/st17-in.nq index 8873fb8..aedd82d 100644 --- a/tests/fromRdf/st17-in.nq +++ b/tests/fromRdf/st17-in.nq @@ -1,2 +1,6 @@ -<<<< "value3">> "value">> "value2" . - <<<< "value3">> "value">> . +_:b0 <<( "value3")>> . +_:b1 <<(_:b0 "value")>> . +_:b1 "value2" . +_:b2 <<( "value3")>> . +_:b3 <<(_:b2 "value")>> . + _:b3 . diff --git a/tests/fromRdf/st17-out.jsonld b/tests/fromRdf/st17-out.jsonld index 16b61bc..cbe0782 100644 --- a/tests/fromRdf/st17-out.jsonld +++ b/tests/fromRdf/st17-out.jsonld @@ -1,21 +1,17 @@ [{ - "@id": "ex:subj", - "ex:value": [{ - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop":[{"@value": "value"}] - } - }] + "@id": "_:b0", + "@reifies": [{"@id": "ex:rei", "ex:prop": [{"@value": "value3"}]}] }, { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value3"}] - }, - "ex:prop":[{"@value": "value"}] - }, + "@id": "_:b1", + "@reifies": [{"@id": "_:b0", "ex:prop": [{"@value": "value"}]}], "ex:prop": [{"@value": "value2"}] +}, { + "@id": "_:b2", + "@reifies": [{"@id": "ex:rei", "ex:prop": [{"@value": "value3"}]}] +}, { + "@id": "_:b3", + "@reifies": [{"@id": "_:b2", "ex:prop": [{"@value": "value"}]}] +}, { + "@id": "ex:subj", + "ex:value": [{"@id": "_:b3"}] }] \ No newline at end of file diff --git a/tests/fromRdf/st18-in.nq b/tests/fromRdf/st18-in.nq index d98d7b9..7e3f4e5 100644 --- a/tests/fromRdf/st18-in.nq +++ b/tests/fromRdf/st18-in.nq @@ -1,2 +1,3 @@ "23"^^ . -<< "23"^^>> "8.0E-1"^^ . +_:b1 <<( "23"^^)>> . +_:b1 "8.0E-1"^^ . diff --git a/tests/fromRdf/st18-out.jsonld b/tests/fromRdf/st18-out.jsonld index 2bea17c..916b3bf 100644 --- a/tests/fromRdf/st18-out.jsonld +++ b/tests/fromRdf/st18-out.jsonld @@ -4,6 +4,7 @@ "@value": "23", "@type": "http://www.w3.org/2001/XMLSchema#integer", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double" diff --git a/tests/fromRdf/st19-in.nq b/tests/fromRdf/st19-in.nq index 89e05ae..50cf7cb 100644 --- a/tests/fromRdf/st19-in.nq +++ b/tests/fromRdf/st19-in.nq @@ -1,4 +1,5 @@ "Fred" . -<< >> "8.0E-1"^^ . +_:b1 <<( )>> . +_:b1 "8.0E-1"^^ . . "Bob" . diff --git a/tests/fromRdf/st20-in.nq b/tests/fromRdf/st20-in.nq index b7cf9de..d836934 100644 --- a/tests/fromRdf/st20-in.nq +++ b/tests/fromRdf/st20-in.nq @@ -1,5 +1,7 @@ "Fred" . -<< >> "8.0E-1"^^ . -<< >> . +_:b1 <<( )>> . +_:b1 "8.0E-1"^^ . +_:b2 <<( )>> . +_:b2 . . "Bob" . diff --git a/tests/fromRdf/st20a-in.nq b/tests/fromRdf/st20a-in.nq index 2c1c054..b29e029 100644 --- a/tests/fromRdf/st20a-in.nq +++ b/tests/fromRdf/st20a-in.nq @@ -1,5 +1,7 @@ -<< >> . -<< >> "8.0E-1"^^ . +_:b1 <<( )>> . +_:b1 . +_:b2 <<( )>> . +_:b2 "8.0E-1"^^ . . "Bob" . "Fred" . diff --git a/tests/fromRdf/st20b-in.nq b/tests/fromRdf/st20b-in.nq deleted file mode 100644 index aded313..0000000 --- a/tests/fromRdf/st20b-in.nq +++ /dev/null @@ -1,3 +0,0 @@ - . - "Bob" . - "Fred" . diff --git a/tests/fromRdf/st20b-out.jsonld b/tests/fromRdf/st20b-out.jsonld deleted file mode 100644 index fe07bb5..0000000 --- a/tests/fromRdf/st20b-out.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": "ex:bob", - "ex:name": [{"@value": "Bob"}], - "ex:knows": [{"@id": "ex:fred"}] -}, -{ - "@id": "ex:fred", - "ex:name": [{"@value": "Fred"}] -}] \ No newline at end of file diff --git a/tests/fromRdf/st28-in.nq b/tests/fromRdf/st28-in.nq index d86da47..d7be01f 100644 --- a/tests/fromRdf/st28-in.nq +++ b/tests/fromRdf/st28-in.nq @@ -1,2 +1,5 @@ -<< _:b0>> "value2" . -<<<< _:b0>> "value2">> "8.0E-1"^^ . +_:b1 <<( _:b0)>> . +_:b1 "value2" . +_:b2 <<( _:b0)>> . +_:b3 <<(_:b2 "value2")>> . +_:b3 "8.0E-1"^^ . diff --git a/tests/fromRdf/st29-in.nq b/tests/fromRdf/st29-in.nq index 286b5d2..27ffb22 100644 --- a/tests/fromRdf/st29-in.nq +++ b/tests/fromRdf/st29-in.nq @@ -1,2 +1,7 @@ << "value">> . << << "value">>>> "8.0E-1"^^ . + + _:b1 . +_:b1 <<( "value")>> . +_:b2 <<( _:b1)>> . +_:b2 "8.0E-1"^^ . diff --git a/tests/fromRdf/st32-in.nq b/tests/fromRdf/st32-in.nq deleted file mode 100644 index 5fc9a1f..0000000 --- a/tests/fromRdf/st32-in.nq +++ /dev/null @@ -1 +0,0 @@ - << >> . diff --git a/tests/fromRdf/st33-in.nq b/tests/fromRdf/st33-in.nq index d7c0714..8f8d9ee 100644 --- a/tests/fromRdf/st33-in.nq +++ b/tests/fromRdf/st33-in.nq @@ -1,2 +1,3 @@ -<< >> . -<< >> . +_:b1 <<( )>> . +_:b1 . +_:b1 . diff --git a/tests/fromRdf/st33-out.jsonld b/tests/fromRdf/st33-out.jsonld index 49cc333..96b1bdf 100644 --- a/tests/fromRdf/st33-out.jsonld +++ b/tests/fromRdf/st33-out.jsonld @@ -1,8 +1,9 @@ [{ - "@id": { + "@id": "_:b1", + "@reifies": [{ "@id": "ex:rei", "ex:prop": [{"@id": "ex:value"}] - }, + }], "ex:rel": [{"@id": "ex:subj"}], "ex:prop": [{"@id": "ex:value2"}] }] \ No newline at end of file diff --git a/tests/fromRdf/st34-in.nq b/tests/fromRdf/st34-in.nq index 40ac408..b5c3703 100644 --- a/tests/fromRdf/st34-in.nq +++ b/tests/fromRdf/st34-in.nq @@ -1,4 +1,5 @@ "Bob" . . "Fred" . -<< >> "8.0E-1"^^ . +_:b1 <<( )>> . +_:b1 "8.0E-1"^^ . diff --git a/tests/fromRdf/st35-in.nq b/tests/fromRdf/st35-in.nq index a71d84f..9b2c209 100644 --- a/tests/fromRdf/st35-in.nq +++ b/tests/fromRdf/st35-in.nq @@ -1,3 +1,3 @@ - << >> . . -<< >> "8.0E-1"^^ . +_:b1 <<( )>> . +_:b1 "8.0E-1"^^ . diff --git a/tests/fromRdf/st36-in.nq b/tests/fromRdf/st36-in.nq index f2b875f..6425ae8 100644 --- a/tests/fromRdf/st36-in.nq +++ b/tests/fromRdf/st36-in.nq @@ -1 +1,2 @@ -<<_:b0 "value">> "value2" . +_:b1 <<(_:b0 "value")>> . +_:b1 "value2" . diff --git a/tests/fromRdf/st36-out.jsonld b/tests/fromRdf/st36-out.jsonld index e10a93c..ae621ab 100644 --- a/tests/fromRdf/st36-out.jsonld +++ b/tests/fromRdf/st36-out.jsonld @@ -1,7 +1,8 @@ [{ - "@id": { + "@id": "_:b1", + "@reifies": [{ "@id": "_:b0", "ex:prop": [{"@value": "value"}] - }, + }], "ex:prop": [{"@value": "value2"}] }] \ No newline at end of file diff --git a/tests/toRdf-manifest.jsonld b/tests/toRdf-manifest.jsonld index b1c9054..ec6f5c8 100644 --- a/tests/toRdf-manifest.jsonld +++ b/tests/toRdf-manifest.jsonld @@ -8,11 +8,11 @@ "sequence": [ { "@id": "#tst01", - "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], - "name": "invalid embedded node 1", - "purpose": "Node with embedded subject without rdfstar option.", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "ignored reification 1", + "purpose": "Node with reification without rdfstar option.", "input": "toRdf/st01-in.jsonld", - "expectErrorCode": "invalid @id value", + "expect": "toRdf/st01-in.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": false} }, { @@ -36,127 +36,199 @@ }, { "@id": "#tst04", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 1", - "purpose": "Node with embedded subject having no @id", + "name": "triple term 1", + "purpose": "Node with triple term having no @id", "input": "toRdf/st04-in.jsonld", "expect": "toRdf/st04-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst04a", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "reification 1", + "purpose": "Node with reification having no @id", + "input": "toRdf/st04a-in.jsonld", + "expect": "toRdf/st04a-out.nq", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst05", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 2", - "purpose": "Node with embedded subject having IRI @id", + "name": "triple term 2", + "purpose": "Node with triple term having IRI @id", "input": "toRdf/st05-in.jsonld", "expect": "toRdf/st05-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst05a", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "reification 2", + "purpose": "Node with reification having IRI @id", + "input": "toRdf/st05a-in.jsonld", + "expect": "toRdf/st05a-out.nq", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst06", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 3", - "purpose": "Node with embedded subject having BNode @id", + "name": "triple term 3", + "purpose": "Node with triple term having BNode @id", "input": "toRdf/st06-in.jsonld", "expect": "toRdf/st06-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst06a", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "reification 3", + "purpose": "Node with reification having BNode @id", + "input": "toRdf/st06a-in.jsonld", + "expect": "toRdf/st06a-out.nq", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst07", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 4", - "purpose": "Node with embedded subject having a type", + "name": "triple term 4", + "purpose": "Node with triple term having a type", "input": "toRdf/st07-in.jsonld", "expect": "toRdf/st07-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst07a", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "reification 4", + "purpose": "Node with reification having a type", + "input": "toRdf/st07a-in.jsonld", + "expect": "toRdf/st07a-out.nq", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst08", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 5", - "purpose": "Node with embedded subject having an IRI value", + "name": "triple term 5", + "purpose": "Node with triple term having an IRI value", "input": "toRdf/st08-in.jsonld", "expect": "toRdf/st08-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst08a", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "reification 5", + "purpose": "Node with reification having an IRI value", + "input": "toRdf/st08a-in.jsonld", + "expect": "toRdf/st08a-out.nq", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst09", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 6", + "name": "triple term 6", "purpose": "Node with embedded subject having an BNode value", "input": "toRdf/st09-in.jsonld", "expect": "toRdf/st09-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst09a", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "reification 6", + "purpose": "Node with reification having an BNode value", + "input": "toRdf/st09a-in.jsonld", + "expect": "toRdf/st09a-out.nq", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst10", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 7", + "name": "triple term 7", "purpose": "Node with recursive embedded subject", "input": "toRdf/st10-in.jsonld", "expect": "toRdf/st10-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst10a", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "reification 7", + "purpose": "Node with recursive reification", + "input": "toRdf/st10a-in.jsonld", + "expect": "toRdf/st10a-out.nq", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst11", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], - "name": "invalid embedded node 2", + "name": "invalid triple term 2", "purpose": "Illegal node with subject having no property", "input": "toRdf/st11-in.jsonld", - "expectErrorCode": "invalid embedded node", + "expectErrorCode": "invalid triple term", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst11a", + "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], + "name": "invalid reification 2", + "purpose": "Illegal node with reification having no property", + "input": "toRdf/st11a-in.jsonld", + "expectErrorCode": "invalid reification", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst12", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], - "name": "invalid embedded node 3", + "name": "invalid triple term 3", "purpose": "Illegal node with subject having multiple properties", "input": "toRdf/st12-in.jsonld", - "expectErrorCode": "invalid embedded node", + "expectErrorCode": "invalid triple term", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst13", - "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], - "name": "invalid embedded node 4", - "purpose": "Illegal node with subject having multiple types", - "input": "toRdf/st13-in.jsonld", - "expectErrorCode": "invalid embedded node", + "@id": "#tst12a", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "invalid reification 3", + "purpose": "Illegal node with reification having multiple properties", + "input": "toRdf/st12a-in.jsonld", + "expect": "toRdf/st12a-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst14", + "@id": "#tst13", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], - "name": "invalid embedded node 5", - "purpose": "Illegal node with subject having type and property", - "input": "toRdf/st14-in.jsonld", - "expectErrorCode": "invalid embedded node", + "name": "invalid triple term 4", + "purpose": "Illegal node with subject having multiple types", + "input": "toRdf/st13-in.jsonld", + "expectErrorCode": "invalid triple term", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst15", + "@id": "#tst13a", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 8", - "purpose": "Node with embedded object", - "input": "toRdf/st15-in.jsonld", - "expect": "toRdf/st15-out.nq", + "name": "multi-statement reification 4", + "purpose": "Node with reification having multiple types", + "input": "toRdf/st13a-in.jsonld", + "expect": "toRdf/st13a-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst16", - "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 9", - "purpose": "Node with embedded object having properties", - "input": "toRdf/st16-in.jsonld", - "expect": "toRdf/st16-out.nq", + "@id": "#tst14", + "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], + "name": "invalid triple term 5", + "purpose": "Illegal node with subject having type and property", + "input": "toRdf/st14-in.jsonld", + "expectErrorCode": "invalid triple term", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { - "@id": "#tst17", + "@id": "#tst14a", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 10", - "purpose": "Node with recursive embedded object", - "input": "toRdf/st17-in.jsonld", - "expect": "toRdf/st17-out.nq", + "name": "multi-statement reification 5", + "purpose": "Node with reification having type and property", + "input": "toRdf/st14a-in.jsonld", + "expect":"toRdf/st14a-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { @@ -296,47 +368,11 @@ "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst29", - "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], "name": "Embedded annotation node 1", "purpose": "Node with @annotation property on embedded object", "input": "toRdf/st29-in.jsonld", - "expect": "toRdf/st29-out.nq", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst30", - "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 11", - "purpose": "Embedded node with reverse relationship", - "input": "toRdf/st30-in.jsonld", - "expectErrorCode": "invalid embedded node", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst31", - "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 12", - "purpose": "Embedded node with expanded reverse relationship", - "input": "toRdf/st31-in.jsonld", - "expectErrorCode": "invalid embedded node", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst32", - "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 13", - "purpose": "Embedded node used as subject in reverse relationship", - "input": "toRdf/st32-in.jsonld", - "expect": "toRdf/st32-out.nq", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst33", - "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "embedded node 14", - "purpose": "Embedded node used as object in reverse relationship", - "input": "toRdf/st33-in.jsonld", - "expect": "toRdf/st33-out.nq", + "expectErrorCode": "invalid triple term", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { @@ -375,24 +411,6 @@ "expect": "toRdf/st37-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst38", - "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "annotation value 1", - "purpose": "embedded node with annotation on value object", - "input": "toRdf/st38-in.jsonld", - "expect": "toRdf/st38-out.nq", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst39", - "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "annotation with embedded node 1", - "purpose": "annotation node containing an embedded node", - "input": "toRdf/st39-in.jsonld", - "expect": "toRdf/st39-out.nq", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst40", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], diff --git a/tests/toRdf/st01-in.jsonld b/tests/toRdf/st01-in.jsonld index 3dd38b3..0835590 100644 --- a/tests/toRdf/st01-in.jsonld +++ b/tests/toRdf/st01-in.jsonld @@ -1,5 +1,5 @@ { - "@id": { + "@reifies": { "@id": "ex:rei", "ex:prop": "value" }, diff --git a/tests/toRdf/st01-in.nq b/tests/toRdf/st01-in.nq new file mode 100644 index 0000000..f4df40f --- /dev/null +++ b/tests/toRdf/st01-in.nq @@ -0,0 +1 @@ +_:b0 "value2" . diff --git a/tests/toRdf/st04-in.jsonld b/tests/toRdf/st04-in.jsonld index 7299716..265b082 100644 --- a/tests/toRdf/st04-in.jsonld +++ b/tests/toRdf/st04-in.jsonld @@ -1,6 +1,8 @@ -{ - "@id": { - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file +[{ + "@id": "ex:s", + "ex:p": [{ + "@triple": { + "ex:prop": [{"@value": "value"}] + } + }] +}] \ No newline at end of file diff --git a/tests/toRdf/st04-out.nq b/tests/toRdf/st04-out.nq index f2b875f..130c1d4 100644 --- a/tests/toRdf/st04-out.nq +++ b/tests/toRdf/st04-out.nq @@ -1 +1 @@ -<<_:b0 "value">> "value2" . + <<(_:b0 "value")>> . diff --git a/tests/toRdf/st04a-in.jsonld b/tests/toRdf/st04a-in.jsonld new file mode 100644 index 0000000..79b21f9 --- /dev/null +++ b/tests/toRdf/st04a-in.jsonld @@ -0,0 +1,8 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "ex:prop": "value" + } + } +} diff --git a/tests/toRdf/st04a-out.nq b/tests/toRdf/st04a-out.nq new file mode 100644 index 0000000..d05c134 --- /dev/null +++ b/tests/toRdf/st04a-out.nq @@ -0,0 +1,2 @@ + _:b1 . +_:b1 <<(_:b2 "value")>> . \ No newline at end of file diff --git a/tests/toRdf/st05-in.jsonld b/tests/toRdf/st05-in.jsonld index 3dd38b3..0835590 100644 --- a/tests/toRdf/st05-in.jsonld +++ b/tests/toRdf/st05-in.jsonld @@ -1,5 +1,5 @@ { - "@id": { + "@reifies": { "@id": "ex:rei", "ex:prop": "value" }, diff --git a/tests/toRdf/st05-out.nq b/tests/toRdf/st05-out.nq index ae59adb..63e2029 100644 --- a/tests/toRdf/st05-out.nq +++ b/tests/toRdf/st05-out.nq @@ -1 +1,2 @@ -<< "value">> "value2" . +_:b0 <<( "value")>> . +_:b0 "value2" . diff --git a/tests/compact/st15-out.jsonld b/tests/toRdf/st05a-in.jsonld similarity index 54% rename from tests/compact/st15-out.jsonld rename to tests/toRdf/st05a-in.jsonld index e041305..e8db352 100644 --- a/tests/compact/st15-out.jsonld +++ b/tests/toRdf/st05a-in.jsonld @@ -1,9 +1,9 @@ { - "@id": "ex:subj", - "ex:value": { - "@id": { + "@id": "ex:s", + "ex:p": { + "@reifies": { "@id": "ex:rei", "ex:prop": "value" } } -} \ No newline at end of file +} diff --git a/tests/toRdf/st05a-out.nq b/tests/toRdf/st05a-out.nq new file mode 100644 index 0000000..dd5634d --- /dev/null +++ b/tests/toRdf/st05a-out.nq @@ -0,0 +1,2 @@ + _:b0 . +_:b0 <<( "value" )>> . \ No newline at end of file diff --git a/tests/toRdf/st06-in.jsonld b/tests/toRdf/st06-in.jsonld index dadf48a..05ba93c 100644 --- a/tests/toRdf/st06-in.jsonld +++ b/tests/toRdf/st06-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "_:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "_:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/toRdf/st06-out.nq b/tests/toRdf/st06-out.nq index 2cb7936..130c1d4 100644 --- a/tests/toRdf/st06-out.nq +++ b/tests/toRdf/st06-out.nq @@ -1 +1 @@ -<<_:rei "value">> "value2" . + <<(_:b0 "value")>> . diff --git a/tests/toRdf/st06a-in.jsonld b/tests/toRdf/st06a-in.jsonld new file mode 100644 index 0000000..97a63c9 --- /dev/null +++ b/tests/toRdf/st06a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "_:rei", + "ex:prop": "value" + } + } +} diff --git a/tests/toRdf/st06a-out.nq b/tests/toRdf/st06a-out.nq new file mode 100644 index 0000000..5e4ac54 --- /dev/null +++ b/tests/toRdf/st06a-out.nq @@ -0,0 +1,2 @@ + _:b0 . +_:b0 <<(_:b1 "value")>> . diff --git a/tests/toRdf/st07-in.jsonld b/tests/toRdf/st07-in.jsonld index 7123c24..8c4dd90 100644 --- a/tests/toRdf/st07-in.jsonld +++ b/tests/toRdf/st07-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "@type": "ex:Type" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "@type": "ex:Type" + } + } +} diff --git a/tests/toRdf/st07-out.nq b/tests/toRdf/st07-out.nq index bc66c5b..33fdf6c 100644 --- a/tests/toRdf/st07-out.nq +++ b/tests/toRdf/st07-out.nq @@ -1 +1 @@ -<< >> "value2" . + <<( )>> . diff --git a/tests/toRdf/st07a-in.jsonld b/tests/toRdf/st07a-in.jsonld new file mode 100644 index 0000000..eb60a85 --- /dev/null +++ b/tests/toRdf/st07a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "ex:rei", + "@type": "ex:Type" + } + } +} diff --git a/tests/toRdf/st07a-out.nq b/tests/toRdf/st07a-out.nq new file mode 100644 index 0000000..a353c5b --- /dev/null +++ b/tests/toRdf/st07a-out.nq @@ -0,0 +1,2 @@ + _:b0 . +_:b0 <<( )>> . diff --git a/tests/toRdf/st08-in.jsonld b/tests/toRdf/st08-in.jsonld index c07dfed..a1f6525 100644 --- a/tests/toRdf/st08-in.jsonld +++ b/tests/toRdf/st08-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": {"@id": "ex:value"} + } + } +} diff --git a/tests/toRdf/st08-out.nq b/tests/toRdf/st08-out.nq index dda1e90..6933747 100644 --- a/tests/toRdf/st08-out.nq +++ b/tests/toRdf/st08-out.nq @@ -1 +1 @@ -<< >> "value2" . + <<( )>> . diff --git a/tests/toRdf/st08a-in.jsonld b/tests/toRdf/st08a-in.jsonld new file mode 100644 index 0000000..54c1288 --- /dev/null +++ b/tests/toRdf/st08a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "ex:value"} + } + } +} diff --git a/tests/toRdf/st08a-out.nq b/tests/toRdf/st08a-out.nq new file mode 100644 index 0000000..048375f --- /dev/null +++ b/tests/toRdf/st08a-out.nq @@ -0,0 +1,2 @@ + _:b0 . +_:b0 <<( )>> . diff --git a/tests/toRdf/st09-in.jsonld b/tests/toRdf/st09-in.jsonld index 8317fe1..3591fcf 100644 --- a/tests/toRdf/st09-in.jsonld +++ b/tests/toRdf/st09-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "_:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} + } + } +} diff --git a/tests/toRdf/st09-out.nq b/tests/toRdf/st09-out.nq index 9ba5549..7eb5b38 100644 --- a/tests/toRdf/st09-out.nq +++ b/tests/toRdf/st09-out.nq @@ -1 +1 @@ -<< _:value>> "value2" . + <<( _:b0)>> . diff --git a/tests/toRdf/st09a-in.jsonld b/tests/toRdf/st09a-in.jsonld new file mode 100644 index 0000000..e7f1a40 --- /dev/null +++ b/tests/toRdf/st09a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} + } + } +} diff --git a/tests/toRdf/st09a-out.nq b/tests/toRdf/st09a-out.nq new file mode 100644 index 0000000..5172472 --- /dev/null +++ b/tests/toRdf/st09a-out.nq @@ -0,0 +1,2 @@ + _:b0 . +_:b0 <<( _:b1)>> . diff --git a/tests/toRdf/st10-in.jsonld b/tests/toRdf/st10-in.jsonld index 87bbd97..fecc2ca 100644 --- a/tests/toRdf/st10-in.jsonld +++ b/tests/toRdf/st10-in.jsonld @@ -1,10 +1,15 @@ { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value3" - }, - "ex:prop": "value" - }, - "ex:prop": "value2" + "@context": {"ex": "http://example/"}, + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:s1", + "ex:p1": { + "@triple": { + "@id": "ex:s2", + "ex:p2": {"@id": "ex:o2"} + } + } + } + } } \ No newline at end of file diff --git a/tests/toRdf/st10-out.nq b/tests/toRdf/st10-out.nq index f4797c0..96aece1 100644 --- a/tests/toRdf/st10-out.nq +++ b/tests/toRdf/st10-out.nq @@ -1 +1 @@ -<<<< "value3">> "value">> "value2" . + <<( <<( )>>)>> . diff --git a/tests/toRdf/st10a-in.jsonld b/tests/toRdf/st10a-in.jsonld new file mode 100644 index 0000000..c89d28d --- /dev/null +++ b/tests/toRdf/st10a-in.jsonld @@ -0,0 +1,15 @@ +{ + "@context": {"ex": "http://example/"}, + "@id": "ex:s", + "ex:p": { + "@reifies": { + "@id": "ex:s1", + "ex:p1": { + "@reifies": { + "@id": "ex:s2", + "ex:p2": {"@id": "ex:o2"} + } + } + } + } +} \ No newline at end of file diff --git a/tests/toRdf/st10a-out.nq b/tests/toRdf/st10a-out.nq new file mode 100644 index 0000000..0c150ff --- /dev/null +++ b/tests/toRdf/st10a-out.nq @@ -0,0 +1,3 @@ + _:b0 . +_:b0 <<(_:b1 <<( )>>)>> . +_:b0 <<( _:b1)>> . diff --git a/tests/toRdf/st11-in.jsonld b/tests/toRdf/st11-in.jsonld index ce4cb23..d6a0609 100644 --- a/tests/toRdf/st11-in.jsonld +++ b/tests/toRdf/st11-in.jsonld @@ -1,6 +1,8 @@ { - "@id": { - "@id": "ex:rei" - }, - "ex:prop": "value3" + "@id": "ex:s", + "ex:prop": { + "@triple": { + "@id": "ex:rei" + } + } } \ No newline at end of file diff --git a/tests/toRdf/st11a-in.jsonld b/tests/toRdf/st11a-in.jsonld new file mode 100644 index 0000000..04a112f --- /dev/null +++ b/tests/toRdf/st11a-in.jsonld @@ -0,0 +1,8 @@ +{ + "@id": "ex:s", + "ex:prop": { + "@reifies": { + "@id": "ex:rei" + } + } +} \ No newline at end of file diff --git a/tests/toRdf/st12-in.jsonld b/tests/toRdf/st12-in.jsonld index 8505f28..ed7053e 100644 --- a/tests/toRdf/st12-in.jsonld +++ b/tests/toRdf/st12-in.jsonld @@ -1,7 +1,8 @@ { - "@id": { - "@id": "ex:rei", - "ex:prop": ["value1", "value2"] - }, - "ex:prop": "value3" + "@id": "ex:s", + "ex:prop": { + "@triple": { + "ex:p": ["value1", "value2"] + } + } } \ No newline at end of file diff --git a/tests/toRdf/st12a-in.jsonld b/tests/toRdf/st12a-in.jsonld new file mode 100644 index 0000000..122ee1c --- /dev/null +++ b/tests/toRdf/st12a-in.jsonld @@ -0,0 +1,8 @@ +{ + "@id": "ex:s", + "ex:prop": { + "@reifies": { + "ex:p": ["value1", "value2"] + } + } +} \ No newline at end of file diff --git a/tests/toRdf/st12a-out.nq b/tests/toRdf/st12a-out.nq new file mode 100644 index 0000000..39b8874 --- /dev/null +++ b/tests/toRdf/st12a-out.nq @@ -0,0 +1,3 @@ + _:b0 . +_:b0 <<(_:b1 "value1")>> . +_:b0 <<(_:b1 "value2")>> . diff --git a/tests/toRdf/st13-in.jsonld b/tests/toRdf/st13-in.jsonld index 47ac51c..bf84b68 100644 --- a/tests/toRdf/st13-in.jsonld +++ b/tests/toRdf/st13-in.jsonld @@ -1,7 +1,9 @@ { - "@id": { - "@id": "ex:rei", - "@type": ["ex:Type1", "ex:Type2"] - }, - "ex:prop": "value3" + "@id": "ex:s", + "ex:prop": { + "@triple": { + "@id": "ex:rei", + "@type": ["ex:Type1", "ex:Type2"] + } + } } \ No newline at end of file diff --git a/tests/toRdf/st13a-in.jsonld b/tests/toRdf/st13a-in.jsonld new file mode 100644 index 0000000..9dd6665 --- /dev/null +++ b/tests/toRdf/st13a-in.jsonld @@ -0,0 +1,9 @@ +{ + "@id": "ex:s", + "ex:prop": { + "@reifies": { + "@id": "ex:rei", + "@type": ["ex:Type1", "ex:Type2"] + } + } +} \ No newline at end of file diff --git a/tests/toRdf/st13a-out.nq b/tests/toRdf/st13a-out.nq new file mode 100644 index 0000000..6e6c6bd --- /dev/null +++ b/tests/toRdf/st13a-out.nq @@ -0,0 +1,3 @@ + _:b0 . +_:b0 <<( )>> . +_:b0 <<( )>> . diff --git a/tests/toRdf/st14-in.jsonld b/tests/toRdf/st14-in.jsonld index d058202..8760874 100644 --- a/tests/toRdf/st14-in.jsonld +++ b/tests/toRdf/st14-in.jsonld @@ -1,8 +1,10 @@ { - "@id": { - "@id": "ex:rei", - "@type": "ex:Type", - "ex:prop": "value" - }, - "ex:prop": "value2" + "@id": "ex:s", + "ex:prop": { + "@triple": { + "@id": "ex:rei", + "@type": "ex:Type", + "ex:prop": "value" + } + } } \ No newline at end of file diff --git a/tests/toRdf/st14a-in.jsonld b/tests/toRdf/st14a-in.jsonld new file mode 100644 index 0000000..829313a --- /dev/null +++ b/tests/toRdf/st14a-in.jsonld @@ -0,0 +1,10 @@ +{ + "@id": "ex:s", + "ex:prop": { + "@reifies": { + "@id": "ex:rei", + "@type": "ex:Type", + "ex:prop": "value" + } + } +} \ No newline at end of file diff --git a/tests/toRdf/st14a-out.nq b/tests/toRdf/st14a-out.nq new file mode 100644 index 0000000..9d2c944 --- /dev/null +++ b/tests/toRdf/st14a-out.nq @@ -0,0 +1,3 @@ + _:b0 . +_:b0 <<( "value")>> . +_:b0 <<( )>> . diff --git a/tests/toRdf/st15-in.jsonld b/tests/toRdf/st15-in.jsonld deleted file mode 100644 index e041305..0000000 --- a/tests/toRdf/st15-in.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - } - } -} \ No newline at end of file diff --git a/tests/toRdf/st15-out.nq b/tests/toRdf/st15-out.nq deleted file mode 100644 index 14f9f0c..0000000 --- a/tests/toRdf/st15-out.nq +++ /dev/null @@ -1 +0,0 @@ - << "value">> . diff --git a/tests/toRdf/st16-in.jsonld b/tests/toRdf/st16-in.jsonld deleted file mode 100644 index a71537f..0000000 --- a/tests/toRdf/st16-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" - } -} \ No newline at end of file diff --git a/tests/toRdf/st16-out.nq b/tests/toRdf/st16-out.nq deleted file mode 100644 index 46b8edc..0000000 --- a/tests/toRdf/st16-out.nq +++ /dev/null @@ -1,2 +0,0 @@ - << "value">> . -<< "value">> "value2" . diff --git a/tests/toRdf/st17-in.jsonld b/tests/toRdf/st17-in.jsonld deleted file mode 100644 index acf24c7..0000000 --- a/tests/toRdf/st17-in.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@id": "ex:subj", - "ex:value": { - "@id": { - "@id": { - "@id": "ex:rei", - "ex:prop": "value3" - }, - "ex:prop": "value" - }, - "ex:prop": "value2" - } -} \ No newline at end of file diff --git a/tests/toRdf/st17-out.nq b/tests/toRdf/st17-out.nq deleted file mode 100644 index 8873fb8..0000000 --- a/tests/toRdf/st17-out.nq +++ /dev/null @@ -1,2 +0,0 @@ -<<<< "value3">> "value">> "value2" . - <<<< "value3">> "value">> . diff --git a/tests/toRdf/st18-out.nq b/tests/toRdf/st18-out.nq index d98d7b9..1cdd4c3 100644 --- a/tests/toRdf/st18-out.nq +++ b/tests/toRdf/st18-out.nq @@ -1,2 +1,3 @@ "23"^^ . -<< "23"^^>> "8.0E-1"^^ . +_:b0 <<( "23"^^)>> . +_:b0 "8.0E-1"^^ . diff --git a/tests/toRdf/st19-out.nq b/tests/toRdf/st19-out.nq index 89e05ae..46d0a2c 100644 --- a/tests/toRdf/st19-out.nq +++ b/tests/toRdf/st19-out.nq @@ -1,4 +1,5 @@ - "Fred" . -<< >> "8.0E-1"^^ . - . "Bob" . + . + "Fred" . +_:b0 <<( )>> . +_:b0 "8.0E-1"^^ . diff --git a/tests/toRdf/st20-out.nq b/tests/toRdf/st20-out.nq index b7cf9de..c1a6b44 100644 --- a/tests/toRdf/st20-out.nq +++ b/tests/toRdf/st20-out.nq @@ -1,5 +1,7 @@ - "Fred" . -<< >> "8.0E-1"^^ . -<< >> . - . "Bob" . + . + "Fred" . +_:b0 <<( )>> . +_:b0 "8.0E-1"^^ . +_:b1 <<( )>> . +_:b1 . diff --git a/tests/toRdf/st20a-out.nq b/tests/toRdf/st20a-out.nq index 2c1c054..ea19dd6 100644 --- a/tests/toRdf/st20a-out.nq +++ b/tests/toRdf/st20a-out.nq @@ -1,5 +1,6 @@ -<< >> . -<< >> "8.0E-1"^^ . - . "Bob" . + . "Fred" . +_:b0 <<( )>> . +_:b0 "8.0E-1"^^ . +_:b0 . diff --git a/tests/toRdf/st20b-out.nq b/tests/toRdf/st20b-out.nq index aded313..be8ae40 100644 --- a/tests/toRdf/st20b-out.nq +++ b/tests/toRdf/st20b-out.nq @@ -1,3 +1,4 @@ - . "Bob" . + . "Fred" . +_:b0 <<( )>> . diff --git a/tests/toRdf/st27a-in.jsonld b/tests/toRdf/st27a-in.jsonld index 0994836..fff9466 100644 --- a/tests/toRdf/st27a-in.jsonld +++ b/tests/toRdf/st27a-in.jsonld @@ -1,7 +1,7 @@ { "@id": "ex:bob", "ex:claims": { - "@id": { + "@triple": { "@id": "ex:fred", "name": "Fred", "@annotation": { diff --git a/tests/toRdf/st28-in.jsonld b/tests/toRdf/st28-in.jsonld index 64f037b..efeaf2c 100644 --- a/tests/toRdf/st28-in.jsonld +++ b/tests/toRdf/st28-in.jsonld @@ -1,5 +1,5 @@ { - "@id": { + "@reifies": { "@id": "ex:rei", "ex:prop": {"@id": "_:value"} }, diff --git a/tests/toRdf/st28-out.nq b/tests/toRdf/st28-out.nq index d86da47..9943d4b 100644 --- a/tests/toRdf/st28-out.nq +++ b/tests/toRdf/st28-out.nq @@ -1,2 +1,4 @@ -<< _:b0>> "value2" . -<<<< _:b0>> "value2">> "8.0E-1"^^ . +_:b0 <<( _:b1)>> . +_:b0 "value2" . +_:b2 <<(_:b0 "value2")>> . +_:b2 "8.0E-1"^^ . diff --git a/tests/toRdf/st29-in.jsonld b/tests/toRdf/st29-in.jsonld index 5597b3d..61871b4 100644 --- a/tests/toRdf/st29-in.jsonld +++ b/tests/toRdf/st29-in.jsonld @@ -1,7 +1,7 @@ { "@id": "ex:subj", "ex:value": { - "@id": { + "@triple": { "@id": "ex:rei", "ex:prop": "value" }, diff --git a/tests/toRdf/st29-out.nq b/tests/toRdf/st29-out.nq deleted file mode 100644 index 286b5d2..0000000 --- a/tests/toRdf/st29-out.nq +++ /dev/null @@ -1,2 +0,0 @@ - << "value">> . -<< << "value">>>> "8.0E-1"^^ . diff --git a/tests/toRdf/st30-in.jsonld b/tests/toRdf/st30-in.jsonld deleted file mode 100644 index 1985c87..0000000 --- a/tests/toRdf/st30-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": { - "rel": {"@reverse": "ex:rel"} - }, - "@id": { - "@id": "ex:rei", - "rel": {"@id": "ex:value"} - }, - "ex:prop": "value2" -} \ No newline at end of file diff --git a/tests/toRdf/st31-in.jsonld b/tests/toRdf/st31-in.jsonld deleted file mode 100644 index 4c2967e..0000000 --- a/tests/toRdf/st31-in.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -{ - "@id": { - "@id": "ex:rei", - "@reverse": { - "ex:rel": {"@id": "ex:value"} - } - }, - "ex:prop": "value2" -} \ No newline at end of file diff --git a/tests/toRdf/st32-in.jsonld b/tests/toRdf/st32-in.jsonld deleted file mode 100644 index a1689ec..0000000 --- a/tests/toRdf/st32-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": { - "rel": {"@reverse": "ex:rel"} - }, - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "rel": {"@id": "ex:value2"} -} \ No newline at end of file diff --git a/tests/toRdf/st32-out.nq b/tests/toRdf/st32-out.nq deleted file mode 100644 index 5fc9a1f..0000000 --- a/tests/toRdf/st32-out.nq +++ /dev/null @@ -1 +0,0 @@ - << >> . diff --git a/tests/toRdf/st33-in.jsonld b/tests/toRdf/st33-in.jsonld deleted file mode 100644 index 90b80c6..0000000 --- a/tests/toRdf/st33-in.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@context": { - "rel": {"@reverse": "ex:rel"} - }, - "@id": "ex:subj", - "rel": { - "@id": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - }, - "ex:prop": {"@id": "ex:value2"} - } -} \ No newline at end of file diff --git a/tests/toRdf/st33-out.nq b/tests/toRdf/st33-out.nq deleted file mode 100644 index d7c0714..0000000 --- a/tests/toRdf/st33-out.nq +++ /dev/null @@ -1,2 +0,0 @@ -<< >> . -<< >> . diff --git a/tests/toRdf/st34-out.nq b/tests/toRdf/st34-out.nq index 40ac408..5300cc6 100644 --- a/tests/toRdf/st34-out.nq +++ b/tests/toRdf/st34-out.nq @@ -1,4 +1,5 @@ "Bob" . . "Fred" . -<< >> "8.0E-1"^^ . +_:b0 <<( )>> . +_:b0 "8.0E-1"^^ . diff --git a/tests/toRdf/st35-out.nq b/tests/toRdf/st35-out.nq index a71d84f..a8b56f6 100644 --- a/tests/toRdf/st35-out.nq +++ b/tests/toRdf/st35-out.nq @@ -1,3 +1,4 @@ - << >> . . -<< >> "8.0E-1"^^ . +_:b0 <<( )>> . +_:b0 "8.0E-1"^^ . + _:b0 . diff --git a/tests/toRdf/st36-in.jsonld b/tests/toRdf/st36-in.jsonld index 8446b13..091b824 100644 --- a/tests/toRdf/st36-in.jsonld +++ b/tests/toRdf/st36-in.jsonld @@ -1,9 +1,9 @@ { - "@context": { - "triple": "@id" - }, - "triple": { - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@context": {"triple": "@triple"}, + "@id": "ex:s", + "ex:p": { + "triple": { + "ex:prop": "value" + } + } +} diff --git a/tests/toRdf/st36-out.nq b/tests/toRdf/st36-out.nq index f2b875f..130c1d4 100644 --- a/tests/toRdf/st36-out.nq +++ b/tests/toRdf/st36-out.nq @@ -1 +1 @@ -<<_:b0 "value">> "value2" . + <<(_:b0 "value")>> . diff --git a/tests/toRdf/st37-out.nq b/tests/toRdf/st37-out.nq index fca137f..1cdd4c3 100644 --- a/tests/toRdf/st37-out.nq +++ b/tests/toRdf/st37-out.nq @@ -1,2 +1,3 @@ -<< "23"^^>> "8.0E-1"^^ . "23"^^ . +_:b0 <<( "23"^^)>> . +_:b0 "8.0E-1"^^ . diff --git a/tests/toRdf/st38-in.jsonld b/tests/toRdf/st38-in.jsonld deleted file mode 100644 index e07a2e3..0000000 --- a/tests/toRdf/st38-in.jsonld +++ /dev/null @@ -1,15 +0,0 @@ -{ - "@context": { - "@base": "http://example.org/", - "@vocab": "http://example.org/", - "claims": {"@type": "@id"} - }, - "@id": { - "@id": "bob", - "knows": {"@id": "alice"} - }, - "certainty": { - "@value": 0.8, - "@annotation": {"claims": "ted"} - } -} \ No newline at end of file diff --git a/tests/toRdf/st38-out.nq b/tests/toRdf/st38-out.nq deleted file mode 100644 index 466a1a7..0000000 --- a/tests/toRdf/st38-out.nq +++ /dev/null @@ -1,2 +0,0 @@ -<< >> "8.0E-1"^^ . -<<<< >> "8.0E-1"^^>> . diff --git a/tests/toRdf/st39-in.jsonld b/tests/toRdf/st39-in.jsonld deleted file mode 100644 index 9224a19..0000000 --- a/tests/toRdf/st39-in.jsonld +++ /dev/null @@ -1,15 +0,0 @@ -{ - "@context": { - "@vocab": "ex:", - "p1": {"@type": "@id"} - }, - "@id": "ex:s", - "p": { - "@id": "ex:o", - "@annotation": { - "r": { - "@id": {"@id": "ex:s1", "p1": "ex:o1"} - } - } - } -} \ No newline at end of file diff --git a/tests/toRdf/st39-out.nq b/tests/toRdf/st39-out.nq deleted file mode 100644 index bcc99b7..0000000 --- a/tests/toRdf/st39-out.nq +++ /dev/null @@ -1,2 +0,0 @@ - . -<< >> << >> . diff --git a/tests/toRdf/st40-out.nq b/tests/toRdf/st40-out.nq index af76351..41afe6c 100644 --- a/tests/toRdf/st40-out.nq +++ b/tests/toRdf/st40-out.nq @@ -1,3 +1,5 @@ . -<< >> . -<<<< >> >> . +_:b0 <<( )>> . +_:b0 . +_:b1 <<(_:b0 )>> . +_:b1 . From ffa544d9333f2e570d62a03230b512213b196d24 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Fri, 16 May 2025 11:18:21 -0700 Subject: [PATCH 2/5] Update some toRdf test inputs to better mach the expand version. --- tests/toRdf/st04-in.jsonld | 10 +++++----- tests/toRdf/st05-in.jsonld | 14 ++++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/toRdf/st04-in.jsonld b/tests/toRdf/st04-in.jsonld index 265b082..0d73a4b 100644 --- a/tests/toRdf/st04-in.jsonld +++ b/tests/toRdf/st04-in.jsonld @@ -1,8 +1,8 @@ -[{ +{ "@id": "ex:s", - "ex:p": [{ + "ex:p": { "@triple": { - "ex:prop": [{"@value": "value"}] + "ex:prop": "value" } - }] -}] \ No newline at end of file + } +} diff --git a/tests/toRdf/st05-in.jsonld b/tests/toRdf/st05-in.jsonld index 0835590..79c8524 100644 --- a/tests/toRdf/st05-in.jsonld +++ b/tests/toRdf/st05-in.jsonld @@ -1,7 +1,9 @@ { - "@reifies": { - "@id": "ex:rei", - "ex:prop": "value" - }, - "ex:prop": "value2" -} \ No newline at end of file + "@id": "ex:s", + "ex:p": { + "@triple": { + "@id": "ex:rei", + "ex:prop": "value" + } + } +} From e6e004c745ddd06fb2457c789e8a5cc24ba60918 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Fri, 16 May 2025 14:30:45 -0700 Subject: [PATCH 3/5] Update reification tests as suggested by @pchampin. --- tests/expand/st04a-in.jsonld | 6 ++---- tests/expand/st04a-out.jsonld | 6 ++---- tests/expand/st05a-in.jsonld | 8 +++----- tests/expand/st05a-out.jsonld | 8 +++----- tests/expand/st06a-in.jsonld | 8 +++----- tests/expand/st06a-out.jsonld | 8 +++----- tests/expand/st07a-in.jsonld | 8 +++----- tests/expand/st07a-out.jsonld | 8 +++----- tests/expand/st08a-in.jsonld | 8 +++----- tests/expand/st08a-out.jsonld | 8 +++----- tests/expand/st09a-in.jsonld | 8 +++----- tests/expand/st09a-out.jsonld | 8 +++----- tests/expand/st10a-in.jsonld | 12 ++++-------- tests/expand/st10a-out.jsonld | 12 ++++-------- tests/expand/st11a-in.jsonld | 6 ++---- tests/expand/st12a-in.jsonld | 6 ++---- tests/expand/st12a-out.jsonld | 6 ++---- tests/expand/st13a-in.jsonld | 8 +++----- tests/expand/st13a-out.jsonld | 8 +++----- tests/expand/st14a-in.jsonld | 10 ++++------ tests/expand/st14a-out.jsonld | 10 ++++------ tests/toRdf/st04a-in.jsonld | 6 ++---- tests/toRdf/st04a-out.nq | 3 +-- tests/toRdf/st05-out.nq | 3 +-- tests/toRdf/st05a-in.jsonld | 8 +++----- tests/toRdf/st05a-out.nq | 3 +-- tests/toRdf/st06a-in.jsonld | 8 +++----- tests/toRdf/st06a-out.nq | 3 +-- tests/toRdf/st07a-in.jsonld | 8 +++----- tests/toRdf/st07a-out.nq | 3 +-- tests/toRdf/st08a-in.jsonld | 8 +++----- tests/toRdf/st08a-out.nq | 3 +-- tests/toRdf/st09a-in.jsonld | 8 +++----- tests/toRdf/st09a-out.nq | 3 +-- tests/toRdf/st10a-in.jsonld | 12 ++++-------- tests/toRdf/st10a-out.nq | 4 +--- tests/toRdf/st11a-in.jsonld | 6 ++---- tests/toRdf/st12a-in.jsonld | 6 ++---- tests/toRdf/st12a-out.nq | 5 ++--- tests/toRdf/st13a-in.jsonld | 8 +++----- tests/toRdf/st13a-out.nq | 5 ++--- tests/toRdf/st14a-in.jsonld | 10 ++++------ tests/toRdf/st14a-out.nq | 5 ++--- 43 files changed, 108 insertions(+), 190 deletions(-) diff --git a/tests/expand/st04a-in.jsonld b/tests/expand/st04a-in.jsonld index 79b21f9..dca0a1d 100644 --- a/tests/expand/st04a-in.jsonld +++ b/tests/expand/st04a-in.jsonld @@ -1,8 +1,6 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "ex:prop": "value" - } + "@reifies": { + "ex:prop": "value" } } diff --git a/tests/expand/st04a-out.jsonld b/tests/expand/st04a-out.jsonld index ae45c29..eeb4f57 100644 --- a/tests/expand/st04a-out.jsonld +++ b/tests/expand/st04a-out.jsonld @@ -1,8 +1,6 @@ [{ "@id": "ex:s", - "ex:p": [{ - "@reifies": [{ - "ex:prop": [{"@value": "value"}] - }] + "@reifies": [{ + "ex:prop": [{"@value": "value"}] }] }] \ No newline at end of file diff --git a/tests/expand/st05a-in.jsonld b/tests/expand/st05a-in.jsonld index e8db352..d524dab 100644 --- a/tests/expand/st05a-in.jsonld +++ b/tests/expand/st05a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "ex:rei", - "ex:prop": "value" - } + "@reifies": { + "@id": "ex:rei", + "ex:prop": "value" } } diff --git a/tests/expand/st05a-out.jsonld b/tests/expand/st05a-out.jsonld index 7fa58d0..eb877ec 100644 --- a/tests/expand/st05a-out.jsonld +++ b/tests/expand/st05a-out.jsonld @@ -1,9 +1,7 @@ [{ "@id": "ex:s", - "ex:p": [{ - "@reifies": [{ - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }] + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] }] }] \ No newline at end of file diff --git a/tests/expand/st06a-in.jsonld b/tests/expand/st06a-in.jsonld index 97a63c9..f58a14b 100644 --- a/tests/expand/st06a-in.jsonld +++ b/tests/expand/st06a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "_:rei", - "ex:prop": "value" - } + "@reifies": { + "@id": "_:rei", + "ex:prop": "value" } } diff --git a/tests/expand/st06a-out.jsonld b/tests/expand/st06a-out.jsonld index 55f266e..499f99b 100644 --- a/tests/expand/st06a-out.jsonld +++ b/tests/expand/st06a-out.jsonld @@ -1,9 +1,7 @@ [{ "@id": "ex:s", - "ex:p": [{ - "@reifies": [{ - "@id": "_:rei", - "ex:prop": [{"@value": "value"}] - }] + "@reifies": [{ + "@id": "_:rei", + "ex:prop": [{"@value": "value"}] }] }] \ No newline at end of file diff --git a/tests/expand/st07a-in.jsonld b/tests/expand/st07a-in.jsonld index eb60a85..a07f696 100644 --- a/tests/expand/st07a-in.jsonld +++ b/tests/expand/st07a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "ex:rei", - "@type": "ex:Type" - } + "@reifies": { + "@id": "ex:rei", + "@type": "ex:Type" } } diff --git a/tests/expand/st07a-out.jsonld b/tests/expand/st07a-out.jsonld index ecf2e0c..63f29b2 100644 --- a/tests/expand/st07a-out.jsonld +++ b/tests/expand/st07a-out.jsonld @@ -1,9 +1,7 @@ [{ "@id": "ex:s", - "ex:p": [{ - "@reifies": [{ - "@id": "ex:rei", - "@type": ["ex:Type"] - }] + "@reifies": [{ + "@id": "ex:rei", + "@type": ["ex:Type"] }] }] \ No newline at end of file diff --git a/tests/expand/st08a-in.jsonld b/tests/expand/st08a-in.jsonld index 54c1288..2e89107 100644 --- a/tests/expand/st08a-in.jsonld +++ b/tests/expand/st08a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - } + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "ex:value"} } } diff --git a/tests/expand/st08a-out.jsonld b/tests/expand/st08a-out.jsonld index f9fba8f..1a265b1 100644 --- a/tests/expand/st08a-out.jsonld +++ b/tests/expand/st08a-out.jsonld @@ -1,9 +1,7 @@ [{ "@id": "ex:s", - "ex:p": [{ - "@reifies": [{ - "@id": "ex:rei", - "ex:prop": [{"@id": "ex:value"}] - }] + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@id": "ex:value"}] }] }] \ No newline at end of file diff --git a/tests/expand/st09a-in.jsonld b/tests/expand/st09a-in.jsonld index e7f1a40..9d1f671 100644 --- a/tests/expand/st09a-in.jsonld +++ b/tests/expand/st09a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "ex:rei", - "ex:prop": {"@id": "_:value"} - } + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} } } diff --git a/tests/expand/st09a-out.jsonld b/tests/expand/st09a-out.jsonld index 03cf5af..fedd819 100644 --- a/tests/expand/st09a-out.jsonld +++ b/tests/expand/st09a-out.jsonld @@ -1,9 +1,7 @@ [{ "@id": "ex:s", - "ex:p": [{ - "@reifies": [{ - "@id": "ex:rei", - "ex:prop": [{"@id": "_:value"}] - }] + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@id": "_:value"}] }] }] \ No newline at end of file diff --git a/tests/expand/st10a-in.jsonld b/tests/expand/st10a-in.jsonld index c89d28d..4ed0d15 100644 --- a/tests/expand/st10a-in.jsonld +++ b/tests/expand/st10a-in.jsonld @@ -1,15 +1,11 @@ { "@context": {"ex": "http://example/"}, "@id": "ex:s", - "ex:p": { + "@reifies": { + "@id": "ex:s1", "@reifies": { - "@id": "ex:s1", - "ex:p1": { - "@reifies": { - "@id": "ex:s2", - "ex:p2": {"@id": "ex:o2"} - } - } + "@id": "ex:s2", + "ex:p2": {"@id": "ex:o2"} } } } \ No newline at end of file diff --git a/tests/expand/st10a-out.jsonld b/tests/expand/st10a-out.jsonld index 7e625d2..a95059d 100644 --- a/tests/expand/st10a-out.jsonld +++ b/tests/expand/st10a-out.jsonld @@ -1,14 +1,10 @@ [{ "@id": "http://example/s", - "http://example/p": [{ + "@reifies": [{ + "@id": "http://example/s1", "@reifies": [{ - "@id": "http://example/s1", - "http://example/p1": [{ - "@reifies": [{ - "@id": "http://example/s2", - "http://example/p2": [{"@id": "http://example/o2"}] - }] - }] + "@id": "http://example/s2", + "http://example/p2": [{"@id": "http://example/o2"}] }] }] }] \ No newline at end of file diff --git a/tests/expand/st11a-in.jsonld b/tests/expand/st11a-in.jsonld index 04a112f..2ff7a1b 100644 --- a/tests/expand/st11a-in.jsonld +++ b/tests/expand/st11a-in.jsonld @@ -1,8 +1,6 @@ { "@id": "ex:s", - "ex:prop": { - "@reifies": { - "@id": "ex:rei" - } + "@reifies": { + "@id": "ex:rei" } } \ No newline at end of file diff --git a/tests/expand/st12a-in.jsonld b/tests/expand/st12a-in.jsonld index 122ee1c..7171119 100644 --- a/tests/expand/st12a-in.jsonld +++ b/tests/expand/st12a-in.jsonld @@ -1,8 +1,6 @@ { "@id": "ex:s", - "ex:prop": { - "@reifies": { - "ex:p": ["value1", "value2"] - } + "@reifies": { + "ex:p": ["value1", "value2"] } } \ No newline at end of file diff --git a/tests/expand/st12a-out.jsonld b/tests/expand/st12a-out.jsonld index fdf3c41..921049c 100644 --- a/tests/expand/st12a-out.jsonld +++ b/tests/expand/st12a-out.jsonld @@ -1,8 +1,6 @@ [{ "@id": "ex:s", - "ex:prop": [{ - "@reifies": [{ - "ex:p": [{"@value": "value1"}, {"@value": "value2"}] - }] + "@reifies": [{ + "ex:p": [{"@value": "value1"}, {"@value": "value2"}] }] }] \ No newline at end of file diff --git a/tests/expand/st13a-in.jsonld b/tests/expand/st13a-in.jsonld index 9dd6665..28d43bf 100644 --- a/tests/expand/st13a-in.jsonld +++ b/tests/expand/st13a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:prop": { - "@reifies": { - "@id": "ex:rei", - "@type": ["ex:Type1", "ex:Type2"] - } + "@reifies": { + "@id": "ex:rei", + "@type": ["ex:Type1", "ex:Type2"] } } \ No newline at end of file diff --git a/tests/expand/st13a-out.jsonld b/tests/expand/st13a-out.jsonld index 2112a33..ad0ec12 100644 --- a/tests/expand/st13a-out.jsonld +++ b/tests/expand/st13a-out.jsonld @@ -1,9 +1,7 @@ [{ "@id": "ex:s", - "ex:prop": [{ - "@reifies": [{ - "@id": "ex:rei", - "@type": ["ex:Type1", "ex:Type2"] - }] + "@reifies": [{ + "@id": "ex:rei", + "@type": ["ex:Type1", "ex:Type2"] }] }] \ No newline at end of file diff --git a/tests/expand/st14a-in.jsonld b/tests/expand/st14a-in.jsonld index 829313a..c0ea594 100644 --- a/tests/expand/st14a-in.jsonld +++ b/tests/expand/st14a-in.jsonld @@ -1,10 +1,8 @@ { "@id": "ex:s", - "ex:prop": { - "@reifies": { - "@id": "ex:rei", - "@type": "ex:Type", - "ex:prop": "value" - } + "@reifies": { + "@id": "ex:rei", + "@type": "ex:Type", + "ex:prop": "value" } } \ No newline at end of file diff --git a/tests/expand/st14a-out.jsonld b/tests/expand/st14a-out.jsonld index 96382e8..aeaed84 100644 --- a/tests/expand/st14a-out.jsonld +++ b/tests/expand/st14a-out.jsonld @@ -1,10 +1,8 @@ [{ "@id": "ex:s", - "ex:prop": [{ - "@reifies": [{ - "@id": "ex:rei", - "@type": ["ex:Type"], - "ex:prop": [{"@value": "value"}] - }] + "@reifies": [{ + "@id": "ex:rei", + "@type": ["ex:Type"], + "ex:prop": [{"@value": "value"}] }] }] \ No newline at end of file diff --git a/tests/toRdf/st04a-in.jsonld b/tests/toRdf/st04a-in.jsonld index 79b21f9..dca0a1d 100644 --- a/tests/toRdf/st04a-in.jsonld +++ b/tests/toRdf/st04a-in.jsonld @@ -1,8 +1,6 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "ex:prop": "value" - } + "@reifies": { + "ex:prop": "value" } } diff --git a/tests/toRdf/st04a-out.nq b/tests/toRdf/st04a-out.nq index d05c134..64af087 100644 --- a/tests/toRdf/st04a-out.nq +++ b/tests/toRdf/st04a-out.nq @@ -1,2 +1 @@ - _:b1 . -_:b1 <<(_:b2 "value")>> . \ No newline at end of file + <<(_:b0 "value")>> . diff --git a/tests/toRdf/st05-out.nq b/tests/toRdf/st05-out.nq index 63e2029..03a19d7 100644 --- a/tests/toRdf/st05-out.nq +++ b/tests/toRdf/st05-out.nq @@ -1,2 +1 @@ -_:b0 <<( "value")>> . -_:b0 "value2" . + <<( "value")>> . diff --git a/tests/toRdf/st05a-in.jsonld b/tests/toRdf/st05a-in.jsonld index e8db352..d524dab 100644 --- a/tests/toRdf/st05a-in.jsonld +++ b/tests/toRdf/st05a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "ex:rei", - "ex:prop": "value" - } + "@reifies": { + "@id": "ex:rei", + "ex:prop": "value" } } diff --git a/tests/toRdf/st05a-out.nq b/tests/toRdf/st05a-out.nq index dd5634d..9fcc3e5 100644 --- a/tests/toRdf/st05a-out.nq +++ b/tests/toRdf/st05a-out.nq @@ -1,2 +1 @@ - _:b0 . -_:b0 <<( "value" )>> . \ No newline at end of file + <<( "value")>> . diff --git a/tests/toRdf/st06a-in.jsonld b/tests/toRdf/st06a-in.jsonld index 97a63c9..f58a14b 100644 --- a/tests/toRdf/st06a-in.jsonld +++ b/tests/toRdf/st06a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "_:rei", - "ex:prop": "value" - } + "@reifies": { + "@id": "_:rei", + "ex:prop": "value" } } diff --git a/tests/toRdf/st06a-out.nq b/tests/toRdf/st06a-out.nq index 5e4ac54..64af087 100644 --- a/tests/toRdf/st06a-out.nq +++ b/tests/toRdf/st06a-out.nq @@ -1,2 +1 @@ - _:b0 . -_:b0 <<(_:b1 "value")>> . + <<(_:b0 "value")>> . diff --git a/tests/toRdf/st07a-in.jsonld b/tests/toRdf/st07a-in.jsonld index eb60a85..a07f696 100644 --- a/tests/toRdf/st07a-in.jsonld +++ b/tests/toRdf/st07a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "ex:rei", - "@type": "ex:Type" - } + "@reifies": { + "@id": "ex:rei", + "@type": "ex:Type" } } diff --git a/tests/toRdf/st07a-out.nq b/tests/toRdf/st07a-out.nq index a353c5b..16781c0 100644 --- a/tests/toRdf/st07a-out.nq +++ b/tests/toRdf/st07a-out.nq @@ -1,2 +1 @@ - _:b0 . -_:b0 <<( )>> . + <<( )>> . diff --git a/tests/toRdf/st08a-in.jsonld b/tests/toRdf/st08a-in.jsonld index 54c1288..2e89107 100644 --- a/tests/toRdf/st08a-in.jsonld +++ b/tests/toRdf/st08a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "ex:rei", - "ex:prop": {"@id": "ex:value"} - } + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "ex:value"} } } diff --git a/tests/toRdf/st08a-out.nq b/tests/toRdf/st08a-out.nq index 048375f..1df793f 100644 --- a/tests/toRdf/st08a-out.nq +++ b/tests/toRdf/st08a-out.nq @@ -1,2 +1 @@ - _:b0 . -_:b0 <<( )>> . + <<( )>> . diff --git a/tests/toRdf/st09a-in.jsonld b/tests/toRdf/st09a-in.jsonld index e7f1a40..9d1f671 100644 --- a/tests/toRdf/st09a-in.jsonld +++ b/tests/toRdf/st09a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:p": { - "@reifies": { - "@id": "ex:rei", - "ex:prop": {"@id": "_:value"} - } + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} } } diff --git a/tests/toRdf/st09a-out.nq b/tests/toRdf/st09a-out.nq index 5172472..ef5cf8a 100644 --- a/tests/toRdf/st09a-out.nq +++ b/tests/toRdf/st09a-out.nq @@ -1,2 +1 @@ - _:b0 . -_:b0 <<( _:b1)>> . + <<( _:b1)>> . diff --git a/tests/toRdf/st10a-in.jsonld b/tests/toRdf/st10a-in.jsonld index c89d28d..4ed0d15 100644 --- a/tests/toRdf/st10a-in.jsonld +++ b/tests/toRdf/st10a-in.jsonld @@ -1,15 +1,11 @@ { "@context": {"ex": "http://example/"}, "@id": "ex:s", - "ex:p": { + "@reifies": { + "@id": "ex:s1", "@reifies": { - "@id": "ex:s1", - "ex:p1": { - "@reifies": { - "@id": "ex:s2", - "ex:p2": {"@id": "ex:o2"} - } - } + "@id": "ex:s2", + "ex:p2": {"@id": "ex:o2"} } } } \ No newline at end of file diff --git a/tests/toRdf/st10a-out.nq b/tests/toRdf/st10a-out.nq index 0c150ff..0394f62 100644 --- a/tests/toRdf/st10a-out.nq +++ b/tests/toRdf/st10a-out.nq @@ -1,3 +1 @@ - _:b0 . -_:b0 <<(_:b1 <<( )>>)>> . -_:b0 <<( _:b1)>> . + <<( <<( )>>)>> . diff --git a/tests/toRdf/st11a-in.jsonld b/tests/toRdf/st11a-in.jsonld index 04a112f..2ff7a1b 100644 --- a/tests/toRdf/st11a-in.jsonld +++ b/tests/toRdf/st11a-in.jsonld @@ -1,8 +1,6 @@ { "@id": "ex:s", - "ex:prop": { - "@reifies": { - "@id": "ex:rei" - } + "@reifies": { + "@id": "ex:rei" } } \ No newline at end of file diff --git a/tests/toRdf/st12a-in.jsonld b/tests/toRdf/st12a-in.jsonld index 122ee1c..7171119 100644 --- a/tests/toRdf/st12a-in.jsonld +++ b/tests/toRdf/st12a-in.jsonld @@ -1,8 +1,6 @@ { "@id": "ex:s", - "ex:prop": { - "@reifies": { - "ex:p": ["value1", "value2"] - } + "@reifies": { + "ex:p": ["value1", "value2"] } } \ No newline at end of file diff --git a/tests/toRdf/st12a-out.nq b/tests/toRdf/st12a-out.nq index 39b8874..8798b60 100644 --- a/tests/toRdf/st12a-out.nq +++ b/tests/toRdf/st12a-out.nq @@ -1,3 +1,2 @@ - _:b0 . -_:b0 <<(_:b1 "value1")>> . -_:b0 <<(_:b1 "value2")>> . + <<(_:b1 "value1")>> . + <<(_:b1 "value2")>> . diff --git a/tests/toRdf/st13a-in.jsonld b/tests/toRdf/st13a-in.jsonld index 9dd6665..28d43bf 100644 --- a/tests/toRdf/st13a-in.jsonld +++ b/tests/toRdf/st13a-in.jsonld @@ -1,9 +1,7 @@ { "@id": "ex:s", - "ex:prop": { - "@reifies": { - "@id": "ex:rei", - "@type": ["ex:Type1", "ex:Type2"] - } + "@reifies": { + "@id": "ex:rei", + "@type": ["ex:Type1", "ex:Type2"] } } \ No newline at end of file diff --git a/tests/toRdf/st13a-out.nq b/tests/toRdf/st13a-out.nq index 6e6c6bd..285bad2 100644 --- a/tests/toRdf/st13a-out.nq +++ b/tests/toRdf/st13a-out.nq @@ -1,3 +1,2 @@ - _:b0 . -_:b0 <<( )>> . -_:b0 <<( )>> . + <<( )>> . + <<( )>> . diff --git a/tests/toRdf/st14a-in.jsonld b/tests/toRdf/st14a-in.jsonld index 829313a..c0ea594 100644 --- a/tests/toRdf/st14a-in.jsonld +++ b/tests/toRdf/st14a-in.jsonld @@ -1,10 +1,8 @@ { "@id": "ex:s", - "ex:prop": { - "@reifies": { - "@id": "ex:rei", - "@type": "ex:Type", - "ex:prop": "value" - } + "@reifies": { + "@id": "ex:rei", + "@type": "ex:Type", + "ex:prop": "value" } } \ No newline at end of file diff --git a/tests/toRdf/st14a-out.nq b/tests/toRdf/st14a-out.nq index 9d2c944..9b6d262 100644 --- a/tests/toRdf/st14a-out.nq +++ b/tests/toRdf/st14a-out.nq @@ -1,3 +1,2 @@ - _:b0 . -_:b0 <<( "value")>> . -_:b0 <<( )>> . + <<( "value")>> . + <<( )>> . From 681767f7558f752753620c661328fbb60f94899d Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sat, 17 May 2025 16:47:39 -0700 Subject: [PATCH 4/5] Fix annotation tests and issues with reverse relationships. --- tests/flatten-manifest.jsonld | 2 +- tests/flatten/st19n-out.jsonld | 1 + tests/flatten/st20bn-out.jsonld | 11 +++++++++++ tests/flatten/st20n-out.jsonld | 6 ++++-- tests/flatten/st28n-out.jsonld | 10 +++++----- tests/flatten/st29n-out.jsonld | 16 ++++++++++------ tests/flatten/st34-out.jsonld | 4 ++-- tests/flatten/st34n-out.jsonld | 1 + tests/flatten/st35n-out.jsonld | 8 ++------ tests/flatten/st38n-out.jsonld | 6 ++++-- tests/flatten/st39n-out.jsonld | 14 ++++++++------ tests/flatten/st40n-out.jsonld | 15 +++++++++------ tests/fromRdf-manifest.jsonld | 27 --------------------------- tests/fromRdf/st19-out.jsonld | 1 + tests/fromRdf/st20-in.nq | 7 +++---- tests/fromRdf/st20-out.jsonld | 1 + tests/fromRdf/st20a-in.nq | 6 +++--- tests/fromRdf/st20a-out.jsonld | 7 +++++-- tests/fromRdf/st28-in.nq | 9 ++++----- tests/fromRdf/st28-out.jsonld | 8 +++++--- tests/fromRdf/st29-in.nq | 9 +++------ tests/fromRdf/st29-out.jsonld | 12 ++++++++---- tests/fromRdf/st34-out.jsonld | 1 + tests/fromRdf/st35-out.jsonld | 9 +-------- tests/fromRdf/st37-in.nq | 2 -- tests/fromRdf/st37-out.jsonld | 13 ------------- tests/fromRdf/st38-in.nq | 6 ++++-- tests/fromRdf/st38-out.jsonld | 6 ++++-- tests/fromRdf/st39-in.nq | 2 -- tests/fromRdf/st39-out.jsonld | 14 -------------- tests/fromRdf/st40-in.nq | 3 --- tests/fromRdf/st40-out.jsonld | 14 -------------- tests/toRdf/st34-out.nq | 2 +- 33 files changed, 102 insertions(+), 151 deletions(-) create mode 100644 tests/flatten/st20bn-out.jsonld delete mode 100644 tests/fromRdf/st37-in.nq delete mode 100644 tests/fromRdf/st37-out.jsonld delete mode 100644 tests/fromRdf/st39-in.nq delete mode 100644 tests/fromRdf/st39-out.jsonld delete mode 100644 tests/fromRdf/st40-in.nq delete mode 100644 tests/fromRdf/st40-out.jsonld diff --git a/tests/flatten-manifest.jsonld b/tests/flatten-manifest.jsonld index 600d1ad..a8d1298 100644 --- a/tests/flatten-manifest.jsonld +++ b/tests/flatten-manifest.jsonld @@ -174,7 +174,7 @@ "name": "Annotation node 5 (with @annotation)", "purpose": "Node with @annotation property containing an empty node object", "input": "flatten/st20b-in.jsonld", - "expect": "flatten/st20b-out.jsonld", + "expect": "flatten/st20bn-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true} }, { diff --git a/tests/flatten/st19n-out.jsonld b/tests/flatten/st19n-out.jsonld index bc4f01a..3740d2f 100644 --- a/tests/flatten/st19n-out.jsonld +++ b/tests/flatten/st19n-out.jsonld @@ -4,6 +4,7 @@ "ex:knows": [{ "@id": "ex:fred", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{"@value": 0.8}] }] }] diff --git a/tests/flatten/st20bn-out.jsonld b/tests/flatten/st20bn-out.jsonld new file mode 100644 index 0000000..90e016a --- /dev/null +++ b/tests/flatten/st20bn-out.jsonld @@ -0,0 +1,11 @@ +[{ + "@id": "ex:bob", + "ex:name": [{"@value": "Bob"}], + "ex:knows": [{ + "@id": "ex:fred", + "@annotation": [{"@id": "_:b1"}] + }] +}, { + "@id": "ex:fred", + "ex:name": [{"@value": "Fred"}] +}] diff --git a/tests/flatten/st20n-out.jsonld b/tests/flatten/st20n-out.jsonld index fe15a95..7e5e0ce 100644 --- a/tests/flatten/st20n-out.jsonld +++ b/tests/flatten/st20n-out.jsonld @@ -4,8 +4,10 @@ "ex:knows": [{ "@id": "ex:fred", "@annotation": [{ - "@id": "_:bn1", - "ex:certainty": [{"@value": 0.8}], + "@id": "_:b1", + "ex:certainty": [{"@value": 0.8}] + }, { + "@id": "_:b3", "ex:source": [{"@id": "http://example.org/"}] }] }] diff --git a/tests/flatten/st28n-out.jsonld b/tests/flatten/st28n-out.jsonld index 6adf144..6bf43c3 100644 --- a/tests/flatten/st28n-out.jsonld +++ b/tests/flatten/st28n-out.jsonld @@ -1,13 +1,13 @@ [{ - "@id": "_:rei", - "@reifies": { + "@id": "_:b2", + "@reifies": [{ "@id": "ex:rei", - "ex:prop": [{"@id": "_:b0"}] - }, + "ex:prop": [{"@id": "_:b1"}] + }], "ex:prop": [{ "@value": "value2", "@annotation": [{ - "@id": "_:bn1", + "@id": "_:b4", "ex:certainty": [{"@value": 0.8}] }] }] diff --git a/tests/flatten/st29n-out.jsonld b/tests/flatten/st29n-out.jsonld index 68287ad..477de2a 100644 --- a/tests/flatten/st29n-out.jsonld +++ b/tests/flatten/st29n-out.jsonld @@ -1,13 +1,17 @@ [{ "@id": "ex:subj", - "ex:value": [{"@id": "_:bn0"}] -}, { - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, + "ex:value": [{ + "@id": "_:b0", "@annotation": [{ + "@id": "_:b2", "ex:certainty": [{"@value": 0.8}] }] }] +}, +{ + "@id": "_:b0", + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + }] }] \ No newline at end of file diff --git a/tests/flatten/st34-out.jsonld b/tests/flatten/st34-out.jsonld index 2962006..127fbf1 100644 --- a/tests/flatten/st34-out.jsonld +++ b/tests/flatten/st34-out.jsonld @@ -7,8 +7,8 @@ }, { "@id": "_:b1", "@reifies": [{ - "@id": "ex:bob", - "ex:knows": [{"@id": "ex:fred"}] + "@id": "ex:fred", + "ex:knows": [{"@id": "ex:bob"}] }], "ex:certainty": [{"@value": 0.8}] } diff --git a/tests/flatten/st34n-out.jsonld b/tests/flatten/st34n-out.jsonld index dc2ad92..38809e0 100644 --- a/tests/flatten/st34n-out.jsonld +++ b/tests/flatten/st34n-out.jsonld @@ -7,6 +7,7 @@ "ex:knows": [{ "@id": "ex:bob", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{"@value": 0.8}] }] }] diff --git a/tests/flatten/st35n-out.jsonld b/tests/flatten/st35n-out.jsonld index ac7a1dd..fc63fc6 100644 --- a/tests/flatten/st35n-out.jsonld +++ b/tests/flatten/st35n-out.jsonld @@ -3,15 +3,11 @@ "ex:knows": [{ "@id": "ex:jane", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{"@value": 0.8}] }] }] },{ "@id": "ex:sue", - "ex:claims": [{ - "@id": { - "@id": "ex:bob", - "ex:knows": [{"@id": "ex:jane"}] - } - }] + "ex:claims": [{"@id": "_:b1"}] }] diff --git a/tests/flatten/st38n-out.jsonld b/tests/flatten/st38n-out.jsonld index a3ee597..cfbd2b8 100644 --- a/tests/flatten/st38n-out.jsonld +++ b/tests/flatten/st38n-out.jsonld @@ -1,11 +1,13 @@ [{ - "@id": { + "@id": "http://example.org/reif", + "@reifies": [{ "@id": "http://example.org/bob", "http://example.org/knows": [{"@id": "http://example.org/alice"}] - }, + }], "http://example.org/certainty": [{ "@value": 0.8, "@annotation": [{ + "@id": "_:b1", "http://example.org/claims": [{"@id": "http://example.org/ted"}] }] }] diff --git a/tests/flatten/st39n-out.jsonld b/tests/flatten/st39n-out.jsonld index fc64c6d..b1716a6 100644 --- a/tests/flatten/st39n-out.jsonld +++ b/tests/flatten/st39n-out.jsonld @@ -3,12 +3,14 @@ "ex:p": [{ "@id": "ex:o", "@annotation": [{ - "ex:r": [{ - "@id": { - "@id": "ex:s1", - "ex:p1": [{"@id": "ex:o1"}] - } - }] + "@id": "_:b1", + "ex:r": [{"@id": "_:b2"}] }] }] +}, { + "@id": "_:b2", + "@reifies": [{ + "@id": "ex:s1", + "ex:p1": [{"@id": "ex:o1"}] + }] }] diff --git a/tests/flatten/st40n-out.jsonld b/tests/flatten/st40n-out.jsonld index d031db8..f8a4d9c 100644 --- a/tests/flatten/st40n-out.jsonld +++ b/tests/flatten/st40n-out.jsonld @@ -3,12 +3,15 @@ "ex:p": [{ "@id": "ex:o", "@annotation": [{ - "ex:r": [{ - "@id": "ex:s1", - "@annotation": [{ - "ex:p1": [{"@id": "ex:o1"}] - }] - }] + "@id": "_:b1", + "ex:r": [{"@id": "ex:s1"}] }] }] +}, { + "@id": "_:b3", + "@reifies": [{ + "@id": "_:b1", + "ex:r": [{"@id": "ex:s1"}] + }], + "ex:p1": [{"@id": "ex:o1"}] }] diff --git a/tests/fromRdf-manifest.jsonld b/tests/fromRdf-manifest.jsonld index c2ac49e..af63d1e 100644 --- a/tests/fromRdf-manifest.jsonld +++ b/tests/fromRdf-manifest.jsonld @@ -186,15 +186,6 @@ "expect": "fromRdf/st36-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst37", - "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Alias for annotation node (with @annotation)", - "purpose": "annotation node with an alias of `@annotation`", - "input": "fromRdf/st37-in.nq", - "expect": "fromRdf/st37-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst38", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], @@ -204,24 +195,6 @@ "expect": "fromRdf/st38-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst39", - "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "annotation with embedded node 1 (with @annotation)", - "purpose": "annotation node containing an embedded node", - "input": "fromRdf/st39-in.nq", - "expect": "fromRdf/st39-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} - }, { - "@id": "#tst40", - "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "annotation with annotation 1 (with @annotation)", - "purpose": "annotation node containing an annotation node", - "input": "fromRdf/st40-in.nq", - "expect": "fromRdf/st40-out.jsonld", - "requires": "JSON-LD-star", - "option": {"specVersion": "json-ld-star", "rdfstar": true} } ] } diff --git a/tests/fromRdf/st19-out.jsonld b/tests/fromRdf/st19-out.jsonld index c744d2d..8e53f78 100644 --- a/tests/fromRdf/st19-out.jsonld +++ b/tests/fromRdf/st19-out.jsonld @@ -4,6 +4,7 @@ "ex:knows": [{ "@id": "ex:fred", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double" diff --git a/tests/fromRdf/st20-in.nq b/tests/fromRdf/st20-in.nq index d836934..172098c 100644 --- a/tests/fromRdf/st20-in.nq +++ b/tests/fromRdf/st20-in.nq @@ -1,7 +1,6 @@ "Fred" . -_:b1 <<( )>> . -_:b1 "8.0E-1"^^ . -_:b2 <<( )>> . -_:b2 . . "Bob" . +_:b1 <<( )>> . +_:b1 "8.0E-1"^^ . +_:b1 . diff --git a/tests/fromRdf/st20-out.jsonld b/tests/fromRdf/st20-out.jsonld index fb4502d..1190654 100644 --- a/tests/fromRdf/st20-out.jsonld +++ b/tests/fromRdf/st20-out.jsonld @@ -4,6 +4,7 @@ "ex:knows": [{ "@id": "ex:fred", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double" diff --git a/tests/fromRdf/st20a-in.nq b/tests/fromRdf/st20a-in.nq index b29e029..c8f5021 100644 --- a/tests/fromRdf/st20a-in.nq +++ b/tests/fromRdf/st20a-in.nq @@ -1,7 +1,7 @@ + . + "Bob" . + "Fred" . _:b1 <<( )>> . _:b1 . _:b2 <<( )>> . _:b2 "8.0E-1"^^ . - . - "Bob" . - "Fred" . diff --git a/tests/fromRdf/st20a-out.jsonld b/tests/fromRdf/st20a-out.jsonld index 1c8f694..52a73bc 100644 --- a/tests/fromRdf/st20a-out.jsonld +++ b/tests/fromRdf/st20a-out.jsonld @@ -4,11 +4,14 @@ "ex:knows": [{ "@id": "ex:fred", "@annotation": [{ + "@id": "_:b1", + "ex:source": [{"@id": "http://example.org/"}] + }, { + "@id": "_:b2", "ex:certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double" - }], - "ex:source": [{"@id": "http://example.org/"}] + }] }] }] }, { diff --git a/tests/fromRdf/st28-in.nq b/tests/fromRdf/st28-in.nq index d7be01f..9943d4b 100644 --- a/tests/fromRdf/st28-in.nq +++ b/tests/fromRdf/st28-in.nq @@ -1,5 +1,4 @@ -_:b1 <<( _:b0)>> . -_:b1 "value2" . -_:b2 <<( _:b0)>> . -_:b3 <<(_:b2 "value2")>> . -_:b3 "8.0E-1"^^ . +_:b0 <<( _:b1)>> . +_:b0 "value2" . +_:b2 <<(_:b0 "value2")>> . +_:b2 "8.0E-1"^^ . diff --git a/tests/fromRdf/st28-out.jsonld b/tests/fromRdf/st28-out.jsonld index f53d536..8dfbb08 100644 --- a/tests/fromRdf/st28-out.jsonld +++ b/tests/fromRdf/st28-out.jsonld @@ -1,11 +1,13 @@ [{ - "@id": { + "@id": "_:b0", + "@reifies": [{ "@id": "ex:rei", - "ex:prop": [{"@id": "_:b0"}] - }, + "ex:prop": [{"@id": "_:b1"}] + }], "ex:prop": [{ "@value": "value2", "@annotation": [{ + "@id": "_:b2", "ex:certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double" diff --git a/tests/fromRdf/st29-in.nq b/tests/fromRdf/st29-in.nq index 27ffb22..75e0bcd 100644 --- a/tests/fromRdf/st29-in.nq +++ b/tests/fromRdf/st29-in.nq @@ -1,7 +1,4 @@ - << "value">> . -<< << "value">>>> "8.0E-1"^^ . - - _:b1 . -_:b1 <<( "value")>> . -_:b2 <<( _:b1)>> . + _:b0 . +_:b0 <<( "value")>> . +_:b2 <<( _:b0)>> . _:b2 "8.0E-1"^^ . diff --git a/tests/fromRdf/st29-out.jsonld b/tests/fromRdf/st29-out.jsonld index d91e699..c63edd0 100644 --- a/tests/fromRdf/st29-out.jsonld +++ b/tests/fromRdf/st29-out.jsonld @@ -1,15 +1,19 @@ [{ "@id": "ex:subj", "ex:value": [{ - "@id": { - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }, + "@id": "_:b0", "@annotation": [{ + "@id": "_:b2", "ex:certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double" }] }] }] +}, { + "@id": "_:b0", + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + }] }] \ No newline at end of file diff --git a/tests/fromRdf/st34-out.jsonld b/tests/fromRdf/st34-out.jsonld index 24d115f..d55d8e5 100644 --- a/tests/fromRdf/st34-out.jsonld +++ b/tests/fromRdf/st34-out.jsonld @@ -7,6 +7,7 @@ "ex:knows": [{ "@id": "ex:bob", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double" diff --git a/tests/fromRdf/st35-out.jsonld b/tests/fromRdf/st35-out.jsonld index a67dc75..711fa47 100644 --- a/tests/fromRdf/st35-out.jsonld +++ b/tests/fromRdf/st35-out.jsonld @@ -3,18 +3,11 @@ "ex:knows": [{ "@id": "ex:jane", "@annotation": [{ + "@id": "_:b1", "ex:certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double" }] }] }] -},{ - "@id": "ex:sue", - "ex:claims": [{ - "@id": { - "@id": "ex:bob", - "ex:knows": [{"@id": "ex:jane"}] - } - }] }] diff --git a/tests/fromRdf/st37-in.nq b/tests/fromRdf/st37-in.nq deleted file mode 100644 index fca137f..0000000 --- a/tests/fromRdf/st37-in.nq +++ /dev/null @@ -1,2 +0,0 @@ -<< "23"^^>> "8.0E-1"^^ . - "23"^^ . diff --git a/tests/fromRdf/st37-out.jsonld b/tests/fromRdf/st37-out.jsonld deleted file mode 100644 index 2db1cd4..0000000 --- a/tests/fromRdf/st37-out.jsonld +++ /dev/null @@ -1,13 +0,0 @@ -[{ - "@id": "ex:bob", - "ex:age": [{ - "@type": "http://www.w3.org/2001/XMLSchema#integer", - "@value": "23", - "@annotation": [{ - "ex:certainty": [{ - "@value": "8.0E-1", - "@type": "http://www.w3.org/2001/XMLSchema#double" - }] - }] - }] -}] diff --git a/tests/fromRdf/st38-in.nq b/tests/fromRdf/st38-in.nq index 466a1a7..58afb34 100644 --- a/tests/fromRdf/st38-in.nq +++ b/tests/fromRdf/st38-in.nq @@ -1,2 +1,4 @@ -<< >> "8.0E-1"^^ . -<<<< >> "8.0E-1"^^>> . + <<( )>> . + "8.0E-1"^^ . +_:b1 <<( "8.0E-1"^^)>> . +_:b1 . diff --git a/tests/fromRdf/st38-out.jsonld b/tests/fromRdf/st38-out.jsonld index e9e556d..024e41d 100644 --- a/tests/fromRdf/st38-out.jsonld +++ b/tests/fromRdf/st38-out.jsonld @@ -1,12 +1,14 @@ [{ - "@id": { + "@id": "http://example.org/reif", + "@reifies": [{ "@id": "http://example.org/bob", "http://example.org/knows": [{"@id": "http://example.org/alice"}] - }, + }], "http://example.org/certainty": [{ "@value": "8.0E-1", "@type": "http://www.w3.org/2001/XMLSchema#double", "@annotation": [{ + "@id": "_:b1", "http://example.org/claims": [{"@id": "http://example.org/ted"}] }] }] diff --git a/tests/fromRdf/st39-in.nq b/tests/fromRdf/st39-in.nq deleted file mode 100644 index bcc99b7..0000000 --- a/tests/fromRdf/st39-in.nq +++ /dev/null @@ -1,2 +0,0 @@ - . -<< >> << >> . diff --git a/tests/fromRdf/st39-out.jsonld b/tests/fromRdf/st39-out.jsonld deleted file mode 100644 index fc64c6d..0000000 --- a/tests/fromRdf/st39-out.jsonld +++ /dev/null @@ -1,14 +0,0 @@ -[{ - "@id": "ex:s", - "ex:p": [{ - "@id": "ex:o", - "@annotation": [{ - "ex:r": [{ - "@id": { - "@id": "ex:s1", - "ex:p1": [{"@id": "ex:o1"}] - } - }] - }] - }] -}] diff --git a/tests/fromRdf/st40-in.nq b/tests/fromRdf/st40-in.nq deleted file mode 100644 index af76351..0000000 --- a/tests/fromRdf/st40-in.nq +++ /dev/null @@ -1,3 +0,0 @@ - . -<< >> . -<<<< >> >> . diff --git a/tests/fromRdf/st40-out.jsonld b/tests/fromRdf/st40-out.jsonld deleted file mode 100644 index d031db8..0000000 --- a/tests/fromRdf/st40-out.jsonld +++ /dev/null @@ -1,14 +0,0 @@ -[{ - "@id": "ex:s", - "ex:p": [{ - "@id": "ex:o", - "@annotation": [{ - "ex:r": [{ - "@id": "ex:s1", - "@annotation": [{ - "ex:p1": [{"@id": "ex:o1"}] - }] - }] - }] - }] -}] diff --git a/tests/toRdf/st34-out.nq b/tests/toRdf/st34-out.nq index 5300cc6..2a24180 100644 --- a/tests/toRdf/st34-out.nq +++ b/tests/toRdf/st34-out.nq @@ -1,5 +1,5 @@ "Bob" . . "Fred" . -_:b0 <<( )>> . +_:b0 <<( )>> . _:b0 "8.0E-1"^^ . From 6142c6ff5cefbcf60577dded613a0e48f7075c29 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 19 May 2025 09:27:45 -0700 Subject: [PATCH 5/5] Adds/updates annotations on triple terms. --- tests/expand-manifest.jsonld | 26 ++++++++++++++++++++++---- tests/expand/st28-in.jsonld | 11 +++++++++++ tests/expand/st28-out.jsonld | 11 +++++++++++ tests/expand/st29-out.jsonld | 10 ++++++++++ tests/expand/st29r-in.jsonld | 10 ++++++++++ tests/expand/st29r-out.jsonld | 10 ++++++++++ tests/flatten-manifest.jsonld | 32 +++++++++++++++++++++++++------- tests/flatten/st29-in.jsonld | 2 +- tests/flatten/st29-out.jsonld | 22 +++++++++++++--------- tests/flatten/st29n-out.jsonld | 14 +++++--------- tests/flatten/st29r-in.jsonld | 10 ++++++++++ tests/flatten/st29r-out.jsonld | 17 +++++++++++++++++ tests/flatten/st29rn-out.jsonld | 19 +++++++++++++++++++ tests/fromRdf-manifest.jsonld | 2 +- tests/toRdf-manifest.jsonld | 21 +++++++++++++++------ tests/toRdf/st28-in.jsonld | 1 + tests/toRdf/st29-out.nq | 3 +++ tests/toRdf/st29r-in.jsonld | 10 ++++++++++ tests/toRdf/st29r-out.nq | 4 ++++ 19 files changed, 198 insertions(+), 37 deletions(-) create mode 100644 tests/expand/st28-in.jsonld create mode 100644 tests/expand/st28-out.jsonld create mode 100644 tests/expand/st29-out.jsonld create mode 100644 tests/expand/st29r-in.jsonld create mode 100644 tests/expand/st29r-out.jsonld create mode 100644 tests/flatten/st29r-in.jsonld create mode 100644 tests/flatten/st29r-out.jsonld create mode 100644 tests/flatten/st29rn-out.jsonld create mode 100644 tests/toRdf/st29-out.nq create mode 100644 tests/toRdf/st29r-in.jsonld create mode 100644 tests/toRdf/st29r-out.nq diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld index 8b01412..b89d441 100644 --- a/tests/expand-manifest.jsonld +++ b/tests/expand-manifest.jsonld @@ -357,13 +357,31 @@ "expectErrorCode": "invalid annotation", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst28", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Annotation on reifier 1", + "purpose": "Node with @annotation property on reifier", + "input": "expand/st28-in.jsonld", + "expect": "expand/st28-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst29", - "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], - "name": "Embedded annotation node 1", - "purpose": "Node with @annotation property on embedded object", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Annotation on triple term 2", + "purpose": "Node with @annotation property on triple term", "input": "expand/st29-in.jsonld", - "expectErrorCode": "invalid triple term", + "expect": "expand/st29-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst29r", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Annotation on reification 2", + "purpose": "Node with @annotation property on reification", + "input": "expand/st29r-in.jsonld", + "expect": "expand/st29r-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { diff --git a/tests/expand/st28-in.jsonld b/tests/expand/st28-in.jsonld new file mode 100644 index 0000000..b066032 --- /dev/null +++ b/tests/expand/st28-in.jsonld @@ -0,0 +1,11 @@ +{ + "@id": "_:rei", + "@reifies": { + "@id": "ex:rei", + "ex:prop": {"@id": "_:value"} + }, + "ex:prop": { + "@value": "value2", + "@annotation": {"ex:certainty": 0.8} + } +} \ No newline at end of file diff --git a/tests/expand/st28-out.jsonld b/tests/expand/st28-out.jsonld new file mode 100644 index 0000000..8e94c45 --- /dev/null +++ b/tests/expand/st28-out.jsonld @@ -0,0 +1,11 @@ +[{ + "@id": "_:rei", + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@id": "_:value"}] + }], + "ex:prop": [{ + "@value": "value2", + "@annotation": [{"ex:certainty": [{"@value": 0.8}]}] + }] +}] \ No newline at end of file diff --git a/tests/expand/st29-out.jsonld b/tests/expand/st29-out.jsonld new file mode 100644 index 0000000..04a08aa --- /dev/null +++ b/tests/expand/st29-out.jsonld @@ -0,0 +1,10 @@ +[{ + "@id": "ex:subj", + "ex:value": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + }, + "@annotation": [{"ex:certainty": [{"@value": 0.8}]}] + }] +}] \ No newline at end of file diff --git a/tests/expand/st29r-in.jsonld b/tests/expand/st29r-in.jsonld new file mode 100644 index 0000000..2d2d03f --- /dev/null +++ b/tests/expand/st29r-in.jsonld @@ -0,0 +1,10 @@ +{ + "@id": "ex:subj", + "ex:value": { + "@reifies": { + "@id": "ex:rei", + "ex:prop": "value" + }, + "@annotation": {"ex:certainty": 0.8} + } +} \ No newline at end of file diff --git a/tests/expand/st29r-out.jsonld b/tests/expand/st29r-out.jsonld new file mode 100644 index 0000000..efd1e6f --- /dev/null +++ b/tests/expand/st29r-out.jsonld @@ -0,0 +1,10 @@ +[{ + "@id": "ex:subj", + "ex:value": [{ + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + }], + "@annotation": [{"ex:certainty": [{"@value": 0.8}]}] + }] +}] \ No newline at end of file diff --git a/tests/flatten-manifest.jsonld b/tests/flatten-manifest.jsonld index a8d1298..09b25f7 100644 --- a/tests/flatten-manifest.jsonld +++ b/tests/flatten-manifest.jsonld @@ -180,8 +180,8 @@ }, { "@id": "#tst28", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "Embedded annotation node 1", - "purpose": "Node with @annotation property on triple term", + "name": "Annotation on reifier 1", + "purpose": "Node with @annotation property on reifier", "input": "flatten/st28-in.jsonld", "expect": "flatten/st28-out.jsonld", "requires": "JSON-LD-star", @@ -189,7 +189,7 @@ }, { "@id": "#tst28n", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "Embedded annotation node 1 (with @annotation)", + "name": "Annotation on triple term 2", "purpose": "Node with @annotation property on triple term", "input": "flatten/st28-in.jsonld", "expect": "flatten/st28n-out.jsonld", @@ -198,8 +198,8 @@ }, { "@id": "#tst29", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "Embedded annotation node 2", - "purpose": "Node with @annotation property on embedded object", + "name": "Annotation on triple term 2", + "purpose": "Node with @annotation property on triple term", "input": "flatten/st29-in.jsonld", "expect": "flatten/st29-out.jsonld", "requires": "JSON-LD-star", @@ -207,12 +207,30 @@ }, { "@id": "#tst29n", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], - "name": "Embedded annotation node 2 (with @annotation)", - "purpose": "Node with @annotation property on embedded object", + "name": "Annotation on triple term 2 (with @annotation)", + "purpose": "Node with @annotation property on triple term", "input": "flatten/st29-in.jsonld", "expect": "flatten/st29n-out.jsonld", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true} + }, { + "@id": "#tst29r", + "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], + "name": "Annotation on reification 2", + "purpose": "Node with @annotation property on reification", + "input": "flatten/st29r-in.jsonld", + "expect": "flatten/st29r-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst29rn", + "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], + "name": "Annotation on reification 2 (with @annotation)", + "purpose": "Node with @annotation property on reification", + "input": "flatten/st29r-in.jsonld", + "expect": "flatten/st29rn-out.jsonld", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true} }, { "@id": "#tst32", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], diff --git a/tests/flatten/st29-in.jsonld b/tests/flatten/st29-in.jsonld index 2d2d03f..61871b4 100644 --- a/tests/flatten/st29-in.jsonld +++ b/tests/flatten/st29-in.jsonld @@ -1,7 +1,7 @@ { "@id": "ex:subj", "ex:value": { - "@reifies": { + "@triple": { "@id": "ex:rei", "ex:prop": "value" }, diff --git a/tests/flatten/st29-out.jsonld b/tests/flatten/st29-out.jsonld index 565bba1..333e136 100644 --- a/tests/flatten/st29-out.jsonld +++ b/tests/flatten/st29-out.jsonld @@ -1,17 +1,21 @@ [{ "@id": "ex:subj", - "ex:value": [{"@id": "_:b0"}] -}, { - "@id": "_:b0", - "@reifies": [{ - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] + "ex:value": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + } }] }, { - "@id": "_:b2", + "@id": "_:b1", "@reifies": [{ "@id": "ex:subj", - "ex:value": [{"@id": "_:b0"}] + "ex:value": [{ + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + } + }] }], "ex:certainty": [{"@value": 0.8}] -}] \ No newline at end of file +}] diff --git a/tests/flatten/st29n-out.jsonld b/tests/flatten/st29n-out.jsonld index 477de2a..85806a3 100644 --- a/tests/flatten/st29n-out.jsonld +++ b/tests/flatten/st29n-out.jsonld @@ -1,17 +1,13 @@ [{ "@id": "ex:subj", "ex:value": [{ - "@id": "_:b0", + "@triple": { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + }, "@annotation": [{ - "@id": "_:b2", + "@id": "_:b1", "ex:certainty": [{"@value": 0.8}] }] }] -}, -{ - "@id": "_:b0", - "@reifies": [{ - "@id": "ex:rei", - "ex:prop": [{"@value": "value"}] - }] }] \ No newline at end of file diff --git a/tests/flatten/st29r-in.jsonld b/tests/flatten/st29r-in.jsonld new file mode 100644 index 0000000..2d2d03f --- /dev/null +++ b/tests/flatten/st29r-in.jsonld @@ -0,0 +1,10 @@ +{ + "@id": "ex:subj", + "ex:value": { + "@reifies": { + "@id": "ex:rei", + "ex:prop": "value" + }, + "@annotation": {"ex:certainty": 0.8} + } +} \ No newline at end of file diff --git a/tests/flatten/st29r-out.jsonld b/tests/flatten/st29r-out.jsonld new file mode 100644 index 0000000..565bba1 --- /dev/null +++ b/tests/flatten/st29r-out.jsonld @@ -0,0 +1,17 @@ +[{ + "@id": "ex:subj", + "ex:value": [{"@id": "_:b0"}] +}, { + "@id": "_:b0", + "@reifies": [{ + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + }] +}, { + "@id": "_:b2", + "@reifies": [{ + "@id": "ex:subj", + "ex:value": [{"@id": "_:b0"}] + }], + "ex:certainty": [{"@value": 0.8}] +}] \ No newline at end of file diff --git a/tests/flatten/st29rn-out.jsonld b/tests/flatten/st29rn-out.jsonld new file mode 100644 index 0000000..a63cd6c --- /dev/null +++ b/tests/flatten/st29rn-out.jsonld @@ -0,0 +1,19 @@ +[{ + "@id": "ex:subj", + "ex:value": [{ + "@id": "_:b0", + "@annotation": [{ + "@id": "_:b2", + "ex:certainty": [{"@value": 0.8}] + }] + }] +}, +{ + "@id": "_:b0", + "@reifies": [ + { + "@id": "ex:rei", + "ex:prop": [{"@value": "value"}] + } + ] +}] \ No newline at end of file diff --git a/tests/fromRdf-manifest.jsonld b/tests/fromRdf-manifest.jsonld index af63d1e..e83802c 100644 --- a/tests/fromRdf-manifest.jsonld +++ b/tests/fromRdf-manifest.jsonld @@ -135,7 +135,7 @@ }, { "@id": "#tst28", "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"], - "name": "Embedded annotation node 1 (with @annotation)", + "name": "Annotation on reifier 1 (with @annotation)", "purpose": "Node with @annotation property on embedded subject", "input": "fromRdf/st28-in.nq", "expect": "fromRdf/st28-out.jsonld", diff --git a/tests/toRdf-manifest.jsonld b/tests/toRdf-manifest.jsonld index ec6f5c8..cc27d68 100644 --- a/tests/toRdf-manifest.jsonld +++ b/tests/toRdf-manifest.jsonld @@ -360,19 +360,28 @@ }, { "@id": "#tst28", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], - "name": "Embedded annotation node 1", - "purpose": "Node with @annotation property on embedded subject", + "name": "Annotation on reifier 1", + "purpose": "Node with @annotation property on reifier", "input": "toRdf/st28-in.jsonld", "expect": "toRdf/st28-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { "@id": "#tst29", - "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], - "name": "Embedded annotation node 1", - "purpose": "Node with @annotation property on embedded object", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "Annotation on triple term 2", + "purpose": "Node with @annotation property on triple term", "input": "toRdf/st29-in.jsonld", - "expectErrorCode": "invalid triple term", + "expect": "toRdf/st29-out.nq", + "requires": "JSON-LD-star", + "option": {"specVersion": "json-ld-star", "rdfstar": true} + }, { + "@id": "#tst29r", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "Annotation on reification 2", + "purpose": "Node with @annotation property on reification", + "input": "toRdf/st29r-in.jsonld", + "expect": "toRdf/st29r-out.nq", "requires": "JSON-LD-star", "option": {"specVersion": "json-ld-star", "rdfstar": true} }, { diff --git a/tests/toRdf/st28-in.jsonld b/tests/toRdf/st28-in.jsonld index efeaf2c..b066032 100644 --- a/tests/toRdf/st28-in.jsonld +++ b/tests/toRdf/st28-in.jsonld @@ -1,4 +1,5 @@ { + "@id": "_:rei", "@reifies": { "@id": "ex:rei", "ex:prop": {"@id": "_:value"} diff --git a/tests/toRdf/st29-out.nq b/tests/toRdf/st29-out.nq new file mode 100644 index 0000000..ac8ab95 --- /dev/null +++ b/tests/toRdf/st29-out.nq @@ -0,0 +1,3 @@ + <<( "value")>> . +_:b1 <<( <<( "value")>>)>> . +_:b1 "8.0E-1"^^ . diff --git a/tests/toRdf/st29r-in.jsonld b/tests/toRdf/st29r-in.jsonld new file mode 100644 index 0000000..2d2d03f --- /dev/null +++ b/tests/toRdf/st29r-in.jsonld @@ -0,0 +1,10 @@ +{ + "@id": "ex:subj", + "ex:value": { + "@reifies": { + "@id": "ex:rei", + "ex:prop": "value" + }, + "@annotation": {"ex:certainty": 0.8} + } +} \ No newline at end of file diff --git a/tests/toRdf/st29r-out.nq b/tests/toRdf/st29r-out.nq new file mode 100644 index 0000000..a1987f1 --- /dev/null +++ b/tests/toRdf/st29r-out.nq @@ -0,0 +1,4 @@ + _:b0 . +_:b0 <<( "value")>> . +_:b1 <<( _:b0)>> . +_:b1 "8.0E-1"^^ .