Flattening
These tests implement the requirements for the JSON-LD-star Flattening Algorithm.
This is an HTML version of a test manifest. The JSON-LD version of this manifest may be found at
flatten-manifest.jsonld.
The manifest vocabulary is described in the
JSON-LD Test Vocabulary
(JSON-LD,
Turtle)
and is based on the RDF Test Vocabulary.
The JSON-LD-star Test Suite is a set of tests that can
be used to verify JSON-LD Processor for the RDF-star extensions to JSON-LD.
More information and an RDFS definition of the test vocabulary can be found at vocab.
General instructions for running the JSON-LD Test suites
Tests are run broadly the same as those for the core JSON-LD test suite, with the addition of the rdfstar
option set to true
for each test. If not set, explicitly, the test checks for proper behavior when not operating in RDF-star mode.
Running tests
The top-level manifest references the specific test manifests, which in turn reference each test associated with a particular type of behavior.
Implementations create their own infrastructure for running the test suite. In particular, the following should be considered:
- For JSON-Ld-star tests, the
specVersion
is set to JSON-LD-star
.
- Some tests may have a
requires
property, indicating some optional behavior described by a test vocabulary term. Tests that use JSON-LD-star functionality have "requires": "JSON-LD-star"
specified.
Contributing Tests
If you would like to contribute a new test or a fix to an existing test,
please follow these steps:
- Notify the JSON-LD Community mailing list, public-linked-json@w3.org,
that you will be creating a new test or fix and the purpose of the
change.
- Clone the git repository: git://github.com/json-ld/json-ld-star.git
- Make your changes and submit them via github, or via a 'git format-patch'
to the JSON-LD Community Group mailing list.
Distribution
Distributed under the W3C Test Suite License. To contribute to a W3C Test Suite, see the policies and contribution forms.
Disclaimer
UNDER THE EXCLUSIVE LICENSE, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
Code of Conduct
W3C functions under a code of conduct.
- baseIri
- https://w3c.github.io/json-ld-api/tests/
Test sequence:
-
Test tst02 ignored annotation 1
-
- id
- #tst02
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node object with @annotation property is ignored without rdfstar option.
- input
-
flatten/st02-in.jsonld
- expect
-
flatten/st02-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- false
- Requires
- JSON-LD-star
-
Test tst03 ignored annotation 2
-
- id
- #tst03
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Value object with @annotation property is ignored without rdfstar option
- input
-
flatten/st03-in.jsonld
- expect
-
flatten/st03-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- false
- Requires
- JSON-LD-star
-
Test tst04 embedded node 1
-
- id
- #tst04
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with embedded subject having no @id
- input
-
flatten/st04-in.jsonld
- expect
-
flatten/st04-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst05 embedded node 2
-
- id
- #tst05
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with embedded subject having IRI @id
- input
-
flatten/st05-in.jsonld
- expect
-
flatten/st05-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst06 embedded node 3
-
- id
- #tst06
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with embedded subject having BNode @id
- input
-
flatten/st06-in.jsonld
- expect
-
flatten/st06-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst07 embedded node 4
-
- id
- #tst07
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with embedded subject having a type
- input
-
flatten/st07-in.jsonld
- expect
-
flatten/st07-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst08 embedded node 5
-
- id
- #tst08
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with embedded subject having an IRI value
- input
-
flatten/st08-in.jsonld
- expect
-
flatten/st08-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst09 embedded node 6
-
- id
- #tst09
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with embedded subject having an BNode value
- input
-
flatten/st09-in.jsonld
- expect
-
flatten/st09-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst10 embedded node 7
-
- id
- #tst10
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with recursive embedded subject
- input
-
flatten/st10-in.jsonld
- expect
-
flatten/st10-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst15 embedded node 8
-
- id
- #tst15
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with embedded object
- input
-
flatten/st15-in.jsonld
- expect
-
flatten/st15-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst16 embedded node 9
-
- id
- #tst16
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with embedded object having properties
- input
-
flatten/st16-in.jsonld
- expect
-
flatten/st16-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst17 embedded node 10
-
- id
- #tst17
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with recursive embedded object
- input
-
flatten/st17-in.jsonld
- expect
-
flatten/st17-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst18 Annotation node 1
-
- id
- #tst18
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property on value object
- input
-
flatten/st18-in.jsonld
- expect
-
flatten/st18-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst18n Annotation node 1 (with @annotation)
-
- id
- #tst18n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property on value object
- input
-
flatten/st18-in.jsonld
- expect
-
flatten/st18n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst19 Annotation node 2
-
- id
- #tst19
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property on node object
- input
-
flatten/st19-in.jsonld
- expect
-
flatten/st19-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst19n Annotation node 2 (with @annotation)
-
- id
- #tst19n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property on node object
- input
-
flatten/st19-in.jsonld
- expect
-
flatten/st19n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst20 Annotation node 3
-
- id
- #tst20
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property multiple values
- input
-
flatten/st20-in.jsonld
- expect
-
flatten/st20-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst20n Annotation node 3 (with @annotation)
-
- id
- #tst20n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property multiple values
- input
-
flatten/st20-in.jsonld
- expect
-
flatten/st20n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst20a Annotation node 4
-
- id
- #tst20a
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property containing multiple properties
- input
-
flatten/st20a-in.jsonld
- expect
-
flatten/st20a-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst20an Annotation node 4 (with @annotation)
-
- id
- #tst20an
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property containing multiple properties
- input
-
flatten/st20a-in.jsonld
- expect
-
flatten/st20an-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst20b Annotation node 5
-
- id
- #tst20b
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property containing an empty node object
- input
-
flatten/st20b-in.jsonld
- expect
-
flatten/st20b-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst20bn Annotation node 5 (with @annotation)
-
- id
- #tst20bn
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property containing an empty node object
- input
-
flatten/st20b-in.jsonld
- expect
-
flatten/st20b-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst28 Embedded annotation node 1
-
- id
- #tst28
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property on embedded subject
- input
-
flatten/st28-in.jsonld
- expect
-
flatten/st28-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst28n Embedded annotation node 1 (with @annotation)
-
- id
- #tst28n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property on embedded subject
- input
-
flatten/st28-in.jsonld
- expect
-
flatten/st28n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst29 Embedded annotation node 2
-
- id
- #tst29
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property on embedded object
- input
-
flatten/st29-in.jsonld
- expect
-
flatten/st29-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst29n Embedded annotation node 2 (with @annotation)
-
- id
- #tst29n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Node with @annotation property on embedded object
- input
-
flatten/st29-in.jsonld
- expect
-
flatten/st29n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst32 embedded node 13
-
- id
- #tst32
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Embedded node used as subject in reverse relationship
- input
-
flatten/st32-in.jsonld
- expect
-
flatten/st32-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst33 embedded node 14
-
- id
- #tst33
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- Embedded node used as object in reverse relationship
- input
-
flatten/st33-in.jsonld
- expect
-
flatten/st33-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst34 Reverse annotation node 1
-
- id
- #tst34
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- node with @annotation property on node object with reverse relationship
- input
-
flatten/st34-in.jsonld
- expect
-
flatten/st34-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst34n Reverse annotation node 1 (with @annotation)
-
- id
- #tst34n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- node with @annotation property on node object with reverse relationship
- input
-
flatten/st34-in.jsonld
- expect
-
flatten/st34n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst35 Reverse annotation node 2
-
- id
- #tst35
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- reverse relationship inside annotation
- input
-
flatten/st35-in.jsonld
- expect
-
flatten/st35-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst35n Reverse annotation node 2 (with @annotation)
-
- id
- #tst35n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- reverse relationship inside annotation
- input
-
flatten/st35-in.jsonld
- expect
-
flatten/st35n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst36 Alias for embedded node
-
- id
- #tst36
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- embedded node with an alias of `@id`
- input
-
flatten/st36-in.jsonld
- expect
-
flatten/st36-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst37 Alias for annotation node
-
- id
- #tst37
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- annotation node with an alias of `@annotation`
- input
-
flatten/st37-in.jsonld
- expect
-
flatten/st37-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst38 annotation value 1
-
- id
- #tst38
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- embedded node with annotation on value object
- input
-
flatten/st38-in.jsonld
- expect
-
flatten/st38-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst38n annotation value 1 (with @annotation)
-
- id
- #tst38n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- embedded node with annotation on value object
- input
-
flatten/st38-in.jsonld
- expect
-
flatten/st38n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst39 annotation with embedded node 1
-
- id
- #tst39
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- annotation node containing an embedded node
- input
-
flatten/st39-in.jsonld
- expect
-
flatten/st39-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst39n annotation with embedded node 1 (with @annotation)
-
- id
- #tst39n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- annotation node containing an embedded node
- input
-
flatten/st39-in.jsonld
- expect
-
flatten/st39n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star
-
Test tst40 annotation with annotation 1
-
- id
- #tst40
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- annotation node containing an annotation node
- input
-
flatten/st40-in.jsonld
- expect
-
flatten/st40-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- Requires
- JSON-LD-star
-
Test tst40n annotation with annotation 1 (with @annotation)
-
- id
- #tst40n
- Type
- jld:PositiveEvaluationTest, jld:FlattenTest
- Purpose
- annotation node containing an annotation node
- input
-
flatten/st40-in.jsonld
- expect
-
flatten/st40n-out.jsonld
- Options
-
- specVersion
- json-ld-star
- rdfstar
- true
- createAnnotations
- true
- Requires
- JSON-LD-star