diff --git a/test-suite/tests/frame-g010-frame.jsonld b/test-suite/tests/frame-g010-frame.jsonld new file mode 100644 index 000000000..5d4545c1f --- /dev/null +++ b/test-suite/tests/frame-g010-frame.jsonld @@ -0,0 +1,31 @@ +{ + "@context": { + "@vocab": "http://example.com/", + "loves": { + "@type": "@id" + }, + "unionOf": { + "@type": "@id", + "@id": "owl:unionOf", + "@container": "@list" + }, + "Class": "owl:Class" + }, + "@graph": [ + { + "@explicit": false, + "@embed": "@last", + "@type": [ + "Act", + "Class" + ], + "@graph": [{ + "@explicit": true, + "@embed": "@always", + "@type": "Person", + "@id": {}, + "loves": {"@embed": "@never"} + }] + } + ] +} \ No newline at end of file diff --git a/test-suite/tests/frame-g010-in.jsonld b/test-suite/tests/frame-g010-in.jsonld new file mode 100644 index 000000000..9947af30c --- /dev/null +++ b/test-suite/tests/frame-g010-in.jsonld @@ -0,0 +1,61 @@ +{ + "@context": { + "@vocab": "http://example.com/", + "loves": { + "@type": "@id" + }, + "unionOf": { + "@type": "@id", + "@id": "owl:unionOf", + "@container": "@list" + }, + "Class": "owl:Class" + }, + "@graph": [ + { + "@type": "Act", + "@graph": [ + { + "@id": "Romeo", + "@type": "Person" + }, + { + "@id": "Juliet", + "@type": "Person" + } + ] + }, + { + "@id": "ActTwo", + "@type": "Act", + "@graph": [ + { + "@id": "Romeo", + "@type": "Person", + "loves": "Juliet" + }, + { + "@id": "Juliet", + "@type": "Person", + "loves": "Romeo" + } + ] + }, + { + "@id": "Person", + "@type": "Class", + "unionOf": { + "@list": [ + { + "@id": "Montague", + "@type": "Class" + }, + { + "@id": "Capulet", + "@type": "Class" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/test-suite/tests/frame-g010-out.jsonld b/test-suite/tests/frame-g010-out.jsonld new file mode 100644 index 000000000..fcffb9a83 --- /dev/null +++ b/test-suite/tests/frame-g010-out.jsonld @@ -0,0 +1,69 @@ +{ + "@context": { + "@vocab": "http://example.com/", + "loves": { + "@type": "@id" + }, + "unionOf": { + "@type": "@id", + "@id": "owl:unionOf", + "@container": "@list" + }, + "Class": "owl:Class" + }, + "@graph": [ + { + "@graph": [ + { + "@id": "Juliet", + "@type": "Person", + "loves": "Romeo" + }, + { + "@id": "Romeo", + "@type": "Person", + "loves": "Juliet" + } + ], + "@id": "ActTwo", + "@type": "Act" + }, + { + "@id": "Capulet", + "@type": "Class" + }, + { + "@id": "Montague", + "@type": "Class" + }, + { + "@id": "Person", + "@type": "Class", + "unionOf": [ + { + "@id": "Montague", + "@type": "Class" + }, + { + "@id": "Capulet", + "@type": "Class" + } + ] + }, + { + "@graph": [ + { + "@id": "Juliet", + "@type": "Person", + "loves": null + }, + { + "@id": "Romeo", + "@type": "Person", + "loves": null + } + ], + "@type": "Act" + } + ] +} diff --git a/test-suite/tests/frame-manifest.jsonld b/test-suite/tests/frame-manifest.jsonld index 0a8d4a5ac..bfe22a3ea 100644 --- a/test-suite/tests/frame-manifest.jsonld +++ b/test-suite/tests/frame-manifest.jsonld @@ -526,7 +526,17 @@ "frame": "frame-g009-frame.jsonld", "expect": "frame-g009-out.jsonld", "option": {"specVersion": "json-ld-1.1"} - }, { + },{ + "@id": "#tg010", + "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], + "name": "Multiple named graphs", + "purpose": "Test embedded graphs", + "input": "frame-g010-in.jsonld", + "frame": "frame-g010-frame.jsonld", + "expect": "frame-g010-out.jsonld", + "option": {"pruneBlankNodeIdentifiers": true} + }, + { "@id": "#tp010", "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"], "name": "property CURIE conflict (prune bnodes)",