├── .github
└── workflows
│ ├── add_prs_and_issues_to_project.yml
│ └── ci.yml
├── .gitignore
├── .pr-preview.json
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Gemfile
├── Gemfile.lock
├── LICENSE.md
├── README.md
├── Rakefile
├── common
├── README.rb
├── algorithm-terms.html
├── common.js
├── extract-examples.rb
├── jsonld.js
├── terms.html
└── typographical-conventions.html
├── index.html
├── publications
└── 2021-02-18.html
├── reports
├── .earl
├── README.md
├── Rakefile
├── earl.jsonld
├── index.html
├── jsonld-streaming-parser.ttl
├── jsonld-streaming-serializer.ttl
├── manifests.nt
├── ruby-json-ld-earl.ttl
└── template.haml
├── tests
├── LICENSE.md
├── README.md
├── Rakefile
├── compact-manifest.html
├── compact-manifest.jsonld
├── compact
│ ├── st04-in.jsonld
│ ├── st04-out.jsonld
│ ├── st05-in.jsonld
│ ├── st05-out.jsonld
│ ├── st06-in.jsonld
│ ├── st06-out.jsonld
│ ├── st07-in.jsonld
│ ├── st07-out.jsonld
│ ├── st08-in.jsonld
│ ├── st08-out.jsonld
│ ├── st09-in.jsonld
│ ├── st09-out.jsonld
│ ├── st10-in.jsonld
│ ├── st10-out.jsonld
│ ├── st15-in.jsonld
│ ├── st15-out.jsonld
│ ├── st16-in.jsonld
│ ├── st16-out.jsonld
│ ├── st17-in.jsonld
│ ├── st17-out.jsonld
│ ├── st18-in.jsonld
│ ├── st18-out.jsonld
│ ├── st19-in.jsonld
│ ├── st19-out.jsonld
│ ├── st20-in.jsonld
│ ├── st20-out.jsonld
│ ├── st20a-in.jsonld
│ ├── st20a-out.jsonld
│ ├── st20b-in.jsonld
│ ├── st20b-out.jsonld
│ ├── st28-in.jsonld
│ ├── st28-out.jsonld
│ ├── st29-in.jsonld
│ ├── st29-out.jsonld
│ ├── st32-in.jsonld
│ ├── st32-out.jsonld
│ ├── st33-in.jsonld
│ ├── st33-out.jsonld
│ ├── st34-in.jsonld
│ ├── st34-out.jsonld
│ ├── st35-in.jsonld
│ ├── st35-out.jsonld
│ ├── st36-in.jsonld
│ ├── st36-out.jsonld
│ ├── st37-in.jsonld
│ ├── st37-out.jsonld
│ ├── st38-in.jsonld
│ ├── st38-out.jsonld
│ ├── st39-in.jsonld
│ ├── st39-out.jsonld
│ ├── st40-in.jsonld
│ └── st40-out.jsonld
├── context.jsonld
├── expand-manifest.html
├── expand-manifest.jsonld
├── expand
│ ├── st01-in.jsonld
│ ├── st02-in.jsonld
│ ├── st02-out.jsonld
│ ├── st03-in.jsonld
│ ├── st03-out.jsonld
│ ├── st04-in.jsonld
│ ├── st04-out.jsonld
│ ├── st05-in.jsonld
│ ├── st05-out.jsonld
│ ├── st06-in.jsonld
│ ├── st06-out.jsonld
│ ├── st07-in.jsonld
│ ├── st07-out.jsonld
│ ├── st08-in.jsonld
│ ├── st08-out.jsonld
│ ├── st09-in.jsonld
│ ├── st09-out.jsonld
│ ├── st10-in.jsonld
│ ├── st10-out.jsonld
│ ├── st11-in.jsonld
│ ├── st12-in.jsonld
│ ├── st13-in.jsonld
│ ├── st14-in.jsonld
│ ├── st15-in.jsonld
│ ├── st15-out.jsonld
│ ├── st16-in.jsonld
│ ├── st16-out.jsonld
│ ├── st17-in.jsonld
│ ├── st17-out.jsonld
│ ├── st18-in.jsonld
│ ├── st18-out.jsonld
│ ├── st19-in.jsonld
│ ├── st19-out.jsonld
│ ├── st20-in.jsonld
│ ├── st20-out.jsonld
│ ├── st20a-in.jsonld
│ ├── st20a-out.jsonld
│ ├── st20b-in.jsonld
│ ├── st20b-out.jsonld
│ ├── st21-in.jsonld
│ ├── st22-in.jsonld
│ ├── st23-in.jsonld
│ ├── st24-in.jsonld
│ ├── st24a-in.jsonld
│ ├── st25-in.jsonld
│ ├── st26-in.jsonld
│ ├── st27-in.jsonld
│ ├── st27a-in.jsonld
│ ├── st28-in.jsonld
│ ├── st28-out.jsonld
│ ├── st29-in.jsonld
│ ├── st29-out.jsonld
│ ├── st30-in.jsonld
│ ├── st31-in.jsonld
│ ├── st32-in.jsonld
│ ├── st32-out.jsonld
│ ├── st33-in.jsonld
│ ├── st33-out.jsonld
│ ├── st34-in.jsonld
│ ├── st34-out.jsonld
│ ├── st35-in.jsonld
│ ├── st35-out.jsonld
│ ├── st36-in.jsonld
│ ├── st36-out.jsonld
│ ├── st37-in.jsonld
│ ├── st37-out.jsonld
│ ├── st38-in.jsonld
│ ├── st38-out.jsonld
│ ├── st39-in.jsonld
│ ├── st39-out.jsonld
│ ├── st40-in.jsonld
│ └── st40-out.jsonld
├── flatten-manifest.html
├── flatten-manifest.jsonld
├── flatten
│ ├── st02-in.jsonld
│ ├── st02-out.jsonld
│ ├── st03-in.jsonld
│ ├── st03-out.jsonld
│ ├── st04-in.jsonld
│ ├── st04-out.jsonld
│ ├── st05-in.jsonld
│ ├── st05-out.jsonld
│ ├── st06-in.jsonld
│ ├── st06-out.jsonld
│ ├── st07-in.jsonld
│ ├── st07-out.jsonld
│ ├── st08-in.jsonld
│ ├── st08-out.jsonld
│ ├── st09-in.jsonld
│ ├── st09-out.jsonld
│ ├── st10-in.jsonld
│ ├── st10-out.jsonld
│ ├── st15-in.jsonld
│ ├── st15-out.jsonld
│ ├── st16-in.jsonld
│ ├── st16-out.jsonld
│ ├── st17-in.jsonld
│ ├── st17-out.jsonld
│ ├── st18-in.jsonld
│ ├── st18-out.jsonld
│ ├── st18n-out.jsonld
│ ├── st19-in.jsonld
│ ├── st19-out.jsonld
│ ├── st19n-out.jsonld
│ ├── st20-in.jsonld
│ ├── st20-out.jsonld
│ ├── st20a-in.jsonld
│ ├── st20a-out.jsonld
│ ├── st20an-out.jsonld
│ ├── st20b-in.jsonld
│ ├── st20b-out.jsonld
│ ├── st20n-out.jsonld
│ ├── st28-in.jsonld
│ ├── st28-out.jsonld
│ ├── st28n-out.jsonld
│ ├── st29-in.jsonld
│ ├── st29-out.jsonld
│ ├── st29n-out.jsonld
│ ├── st32-in.jsonld
│ ├── st32-out.jsonld
│ ├── st33-in.jsonld
│ ├── st33-out.jsonld
│ ├── st34-in.jsonld
│ ├── st34-out.jsonld
│ ├── st34n-out.jsonld
│ ├── st35-in.jsonld
│ ├── st35-out.jsonld
│ ├── st35n-out.jsonld
│ ├── st36-in.jsonld
│ ├── st36-out.jsonld
│ ├── st37-in.jsonld
│ ├── st37-out.jsonld
│ ├── st38-in.jsonld
│ ├── st38-out.jsonld
│ ├── st38n-out.jsonld
│ ├── st39-in.jsonld
│ ├── st39-out.jsonld
│ ├── st39n-out.jsonld
│ ├── st40-in.jsonld
│ ├── st40-out.jsonld
│ └── st40n-out.jsonld
├── fromRdf-manifest.html
├── fromRdf-manifest.jsonld
├── fromRdf
│ ├── st02-in.nq
│ ├── st02-out.jsonld
│ ├── st03-in.nq
│ ├── st03-out.jsonld
│ ├── st04-in.nq
│ ├── st04-out.jsonld
│ ├── st05-in.nq
│ ├── st05-out.jsonld
│ ├── st06-in.nq
│ ├── st06-out.jsonld
│ ├── st07-in.nq
│ ├── st07-out.jsonld
│ ├── st08-in.nq
│ ├── st08-out.jsonld
│ ├── st09-in.nq
│ ├── st09-out.jsonld
│ ├── st10-in.nq
│ ├── st10-out.jsonld
│ ├── st15-in.nq
│ ├── st15-out.jsonld
│ ├── st16-in.nq
│ ├── st16-out.jsonld
│ ├── st17-in.nq
│ ├── st17-out.jsonld
│ ├── st18-in.nq
│ ├── st18-out.jsonld
│ ├── st19-in.nq
│ ├── st19-out.jsonld
│ ├── st20-in.nq
│ ├── st20-out.jsonld
│ ├── st20a-in.nq
│ ├── st20a-out.jsonld
│ ├── st20b-in.nq
│ ├── st20b-out.jsonld
│ ├── st28-in.nq
│ ├── st28-out.jsonld
│ ├── st29-in.nq
│ ├── st29-out.jsonld
│ ├── st32-in.nq
│ ├── st32-out.jsonld
│ ├── st33-in.nq
│ ├── st33-out.jsonld
│ ├── st34-in.nq
│ ├── st34-out.jsonld
│ ├── st35-in.nq
│ ├── st35-out.jsonld
│ ├── st36-in.nq
│ ├── st36-out.jsonld
│ ├── st37-in.nq
│ ├── st37-out.jsonld
│ ├── st38-in.nq
│ ├── st38-out.jsonld
│ ├── st39-in.nq
│ ├── st39-out.jsonld
│ ├── st40-in.nq
│ └── st40-out.jsonld
├── manifest.html
├── manifest.jsonld
├── template.haml
├── toRdf-manifest.html
├── toRdf-manifest.jsonld
└── toRdf
│ ├── st01-in.jsonld
│ ├── st02-in.jsonld
│ ├── st02-out.nq
│ ├── st03-in.jsonld
│ ├── st03-out.nq
│ ├── st04-in.jsonld
│ ├── st04-out.nq
│ ├── st05-in.jsonld
│ ├── st05-out.nq
│ ├── st06-in.jsonld
│ ├── st06-out.nq
│ ├── st07-in.jsonld
│ ├── st07-out.nq
│ ├── st08-in.jsonld
│ ├── st08-out.nq
│ ├── st09-in.jsonld
│ ├── st09-out.nq
│ ├── st10-in.jsonld
│ ├── st10-out.nq
│ ├── st11-in.jsonld
│ ├── st12-in.jsonld
│ ├── st13-in.jsonld
│ ├── st14-in.jsonld
│ ├── st15-in.jsonld
│ ├── st15-out.nq
│ ├── st16-in.jsonld
│ ├── st16-out.nq
│ ├── st17-in.jsonld
│ ├── st17-out.nq
│ ├── st18-in.jsonld
│ ├── st18-out.nq
│ ├── st19-in.jsonld
│ ├── st19-out.nq
│ ├── st20-in.jsonld
│ ├── st20-out.nq
│ ├── st20a-in.jsonld
│ ├── st20a-out.nq
│ ├── st20b-in.jsonld
│ ├── st20b-out.nq
│ ├── st21-in.jsonld
│ ├── st22-in.jsonld
│ ├── st23-in.jsonld
│ ├── st24-in.jsonld
│ ├── st24a-in.jsonld
│ ├── st25-in.jsonld
│ ├── st26-in.jsonld
│ ├── st27-in.jsonld
│ ├── st27a-in.jsonld
│ ├── st28-in.jsonld
│ ├── st28-out.nq
│ ├── st29-in.jsonld
│ ├── st29-out.nq
│ ├── st30-in.jsonld
│ ├── st31-in.jsonld
│ ├── st32-in.jsonld
│ ├── st32-out.nq
│ ├── st33-in.jsonld
│ ├── st33-out.nq
│ ├── st34-in.jsonld
│ ├── st34-out.nq
│ ├── st35-in.jsonld
│ ├── st35-out.nq
│ ├── st36-in.jsonld
│ ├── st36-out.nq
│ ├── st37-in.jsonld
│ ├── st37-out.nq
│ ├── st38-in.jsonld
│ ├── st38-out.nq
│ ├── st39-in.jsonld
│ ├── st39-out.nq
│ ├── st40-in.jsonld
│ └── st40-out.nq
└── w3c.json
/.github/workflows/add_prs_and_issues_to_project.yml:
--------------------------------------------------------------------------------
1 | name: Add pull requests and issues to projects
2 |
3 | on:
4 | pull_request_target:
5 | types:
6 | - opened
7 | issues:
8 | types:
9 | - opened
10 |
11 | jobs:
12 | add-to-project:
13 | name: Add PR and issues to project
14 | runs-on: ubuntu-latest
15 | steps:
16 | - uses: actions/add-to-project@v0.4.1
17 | with:
18 | project-url: https://github.com/orgs/w3c/projects/84
19 | github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
20 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | # This workflow validates the document for markup and examples.
2 | name: CI
3 |
4 | on:
5 | push:
6 | branches: [ '**' ]
7 | pull_request:
8 | branches: [ main ]
9 |
10 | jobs:
11 | tests:
12 | name: Build and Validate
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v3
16 | - name: Set up Ruby
17 | uses: ruby/setup-ruby@v1
18 | with:
19 | ruby-version: 3.2
20 | - name: Install dependencies
21 | run: bundle install
22 |
23 | # Validate Examples
24 | - name: Verify examples are consistent
25 | run: bundle exec rake test
26 |
27 | # Validate via ReSpec
28 | # See https://github.com/w3c/spec-prod/blob/main/docs/examples.md
29 | - name: ReSpec Checker
30 | uses: w3c/spec-prod@v2
31 | with:
32 | VALIDATE_LINKS: true
33 | VALIDATE_MARKUP: true
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.byebug_history
2 |
--------------------------------------------------------------------------------
/.pr-preview.json:
--------------------------------------------------------------------------------
1 | {
2 | "src_file": "index.html",
3 | "type": "respec"
4 | }
5 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | All documentation, code and communication under this repository are covered by the [W3C Code of Ethics and Professional Conduct](https://www.w3.org/Consortium/cepc/).
4 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # JSON-LD Working Group
2 |
3 | Contributions to this repository are intended to become part of Recommendation-track documents governed by the
4 | [W3C Patent Policy](https://www.w3.org/Consortium/Patent-Policy-20040205/) and
5 | [Software and Document License](https://www.w3.org/Consortium/Legal/copyright-software). To make substantive contributions to specifications, you must either participate
6 | in the relevant W3C Working Group or make a non-member patent licensing commitment.
7 |
8 | If you are not the sole contributor to a contribution (pull request), please identify all
9 | contributors in the pull request comment.
10 |
11 | To add a contributor (other than yourself, that's automatic), mark them one per line as follows:
12 |
13 | ```
14 | +@github_username
15 | ```
16 |
17 | If you added a contributor by mistake, you can remove them in a comment with:
18 |
19 | ```
20 | -@github_username
21 | ```
22 |
23 | If you are making a pull request on behalf of someone else but you had no part in designing the
24 | feature, you can remove yourself with the above syntax.
25 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem 'linkeddata'
4 | gem 'earl-report'
5 | gem 'nokogiri'
6 | gem 'htmlbeautifier'
7 | gem 'colorize'
8 | gem 'rake'
9 | gem 'redcarpet'
10 | gem 'byebug'
11 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | addressable (2.8.6)
5 | public_suffix (>= 2.0.2, < 6.0)
6 | bcp47_spec (0.2.1)
7 | builder (3.2.4)
8 | byebug (11.1.3)
9 | colorize (1.1.0)
10 | concurrent-ruby (1.2.3)
11 | connection_pool (2.4.1)
12 | earl-report (0.9.0)
13 | haml (>= 6.1)
14 | json-ld (~> 3.3)
15 | kramdown (~> 2.4)
16 | rdf (~> 3.3)
17 | rdf-turtle (~> 3.3)
18 | rdf-vocab (~> 3.3)
19 | sparql (~> 3.3)
20 | ebnf (2.4.0)
21 | htmlentities (~> 4.3)
22 | rdf (~> 3.3)
23 | scanf (~> 1.0)
24 | sxp (~> 1.3)
25 | unicode-types (~> 1.8)
26 | haml (6.3.0)
27 | temple (>= 0.8.2)
28 | thor
29 | tilt
30 | hamster (3.0.0)
31 | concurrent-ruby (~> 1.0)
32 | htmlbeautifier (1.4.2)
33 | htmlentities (4.3.4)
34 | json-canonicalization (1.0.0)
35 | json-ld (3.3.1)
36 | htmlentities (~> 4.3)
37 | json-canonicalization (~> 1.0)
38 | link_header (~> 0.0, >= 0.0.8)
39 | multi_json (~> 1.15)
40 | rack (>= 2.2, < 4)
41 | rdf (~> 3.3)
42 | json-ld-preloaded (3.3.0)
43 | json-ld (~> 3.3)
44 | rdf (~> 3.3)
45 | kramdown (2.4.0)
46 | rexml
47 | ld-patch (3.3.0)
48 | ebnf (~> 2.4)
49 | rdf (~> 3.3)
50 | rdf-xsd (~> 3.3)
51 | sparql (~> 3.3)
52 | sxp (~> 1.3)
53 | link_header (0.0.8)
54 | linkeddata (3.3.1)
55 | json-ld (~> 3.3)
56 | json-ld-preloaded (~> 3.3)
57 | ld-patch (~> 3.3)
58 | nokogiri (~> 1.15, >= 1.15.4)
59 | rdf (~> 3.2, >= 3.2.1)
60 | rdf-aggregate-repo (~> 3.2)
61 | rdf-hamster-repo (~> 3.3)
62 | rdf-isomorphic (~> 3.3)
63 | rdf-json (~> 3.3)
64 | rdf-microdata (~> 3.3)
65 | rdf-n3 (~> 3.3)
66 | rdf-normalize (~> 0.7)
67 | rdf-ordered-repo (~> 3.3)
68 | rdf-rdfa (~> 3.3)
69 | rdf-rdfxml (~> 3.3)
70 | rdf-reasoner (~> 0.9)
71 | rdf-tabular (~> 3.3)
72 | rdf-trig (~> 3.3)
73 | rdf-trix (~> 3.3)
74 | rdf-turtle (~> 3.3)
75 | rdf-vocab (~> 3.3)
76 | rdf-xsd (~> 3.3)
77 | shacl (~> 0.4)
78 | shex (~> 0.8)
79 | sparql (~> 3.3)
80 | sparql-client (~> 3.3)
81 | yaml-ld (~> 0.0)
82 | logger (1.6.0)
83 | matrix (0.4.2)
84 | mini_portile2 (2.8.8)
85 | multi_json (1.15.0)
86 | net-http-persistent (4.0.2)
87 | connection_pool (~> 2.2)
88 | nokogiri (1.18.8)
89 | mini_portile2 (~> 2.8.2)
90 | racc (~> 1.4)
91 | nokogiri (1.18.8-aarch64-linux-gnu)
92 | racc (~> 1.4)
93 | nokogiri (1.18.8-arm-linux-gnu)
94 | racc (~> 1.4)
95 | nokogiri (1.18.8-arm64-darwin)
96 | racc (~> 1.4)
97 | nokogiri (1.18.8-x86_64-darwin)
98 | racc (~> 1.4)
99 | nokogiri (1.18.8-x86_64-linux-gnu)
100 | racc (~> 1.4)
101 | psych (5.1.2)
102 | stringio
103 | public_suffix (5.0.4)
104 | racc (1.8.1)
105 | rack (3.0.16)
106 | rake (13.1.0)
107 | rdf (3.3.1)
108 | bcp47_spec (~> 0.2)
109 | link_header (~> 0.0, >= 0.0.8)
110 | rdf-aggregate-repo (3.3.0)
111 | rdf (~> 3.3)
112 | rdf-hamster-repo (3.3.0)
113 | hamster (~> 3.0)
114 | rdf (~> 3.3)
115 | rdf-isomorphic (3.3.0)
116 | rdf (~> 3.3)
117 | rdf-json (3.3.0)
118 | rdf (~> 3.3)
119 | rdf-microdata (3.3.0)
120 | htmlentities (~> 4.3)
121 | nokogiri (~> 1.15, >= 1.15.4)
122 | rdf (~> 3.3)
123 | rdf-rdfa (~> 3.3)
124 | rdf-xsd (~> 3.3)
125 | rdf-n3 (3.3.0)
126 | ebnf (~> 2.4)
127 | rdf (~> 3.3)
128 | sparql (~> 3.3)
129 | sxp (~> 1.3)
130 | rdf-normalize (0.7.0)
131 | rdf (~> 3.3)
132 | rdf-ordered-repo (3.3.0)
133 | rdf (~> 3.3)
134 | rdf-rdfa (3.3.0)
135 | haml (~> 6.1)
136 | htmlentities (~> 4.3)
137 | rdf (~> 3.3)
138 | rdf-aggregate-repo (~> 3.3)
139 | rdf-vocab (~> 3.3)
140 | rdf-xsd (~> 3.3)
141 | rdf-rdfxml (3.3.0)
142 | builder (~> 3.2, >= 3.2.4)
143 | htmlentities (~> 4.3)
144 | rdf (~> 3.3)
145 | rdf-xsd (~> 3.3)
146 | rdf-reasoner (0.9.0)
147 | rdf (~> 3.3)
148 | rdf-xsd (~> 3.3)
149 | rdf-tabular (3.3.0)
150 | addressable (~> 2.8)
151 | bcp47_spec (~> 0.2)
152 | json-ld (~> 3.3)
153 | rdf (~> 3.3)
154 | rdf-vocab (~> 3.3)
155 | rdf-xsd (~> 3.3)
156 | rdf-trig (3.3.0)
157 | ebnf (~> 2.4)
158 | rdf (~> 3.3)
159 | rdf-turtle (~> 3.3)
160 | rdf-trix (3.3.0)
161 | rdf (~> 3.3)
162 | rdf-xsd (~> 3.3)
163 | rdf-turtle (3.3.0)
164 | ebnf (~> 2.4)
165 | rdf (~> 3.3)
166 | rdf-vocab (3.3.0)
167 | rdf (~> 3.3)
168 | rdf-xsd (3.3.0)
169 | rdf (~> 3.3)
170 | rexml (~> 3.2)
171 | redcarpet (3.6.0)
172 | rexml (3.3.9)
173 | scanf (1.0.0)
174 | shacl (0.4.1)
175 | json-ld (~> 3.3)
176 | rdf (~> 3.3)
177 | sparql (~> 3.3)
178 | sxp (~> 1.2)
179 | shex (0.8.0)
180 | ebnf (~> 2.4)
181 | htmlentities (~> 4.3)
182 | json-ld (~> 3.3)
183 | json-ld-preloaded (~> 3.3)
184 | rdf (~> 3.3)
185 | rdf-xsd (~> 3.3)
186 | sparql (~> 3.3)
187 | sxp (~> 1.3)
188 | sparql (3.3.0)
189 | builder (~> 3.2, >= 3.2.4)
190 | ebnf (~> 2.4)
191 | logger (~> 1.5)
192 | rdf (~> 3.3)
193 | rdf-aggregate-repo (~> 3.3)
194 | rdf-xsd (~> 3.3)
195 | sparql-client (~> 3.3)
196 | sxp (~> 1.3)
197 | sparql-client (3.3.0)
198 | net-http-persistent (~> 4.0, >= 4.0.2)
199 | rdf (~> 3.3)
200 | stringio (3.1.0)
201 | sxp (1.3.0)
202 | matrix (~> 0.4)
203 | rdf (~> 3.3)
204 | temple (0.10.3)
205 | thor (1.3.0)
206 | tilt (2.3.0)
207 | unicode-types (1.9.0)
208 | yaml-ld (0.0.3)
209 | json-ld (~> 3.3)
210 | psych (>= 3.3)
211 | rdf (~> 3.3)
212 | rdf-xsd (~> 3.3)
213 |
214 | PLATFORMS
215 | aarch64-linux
216 | arm-linux
217 | arm64-darwin
218 | x86-linux
219 | x86_64-darwin
220 | x86_64-linux
221 |
222 | DEPENDENCIES
223 | byebug
224 | colorize
225 | earl-report
226 | htmlbeautifier
227 | linkeddata
228 | nokogiri
229 | rake
230 | redcarpet
231 |
232 | BUNDLED WITH
233 | 2.5.6
234 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | All documents in this Repository are licensed by contributors
2 | under the
3 | [W3C Software and Document License](https://www.w3.org/Consortium/Legal/copyright-software).
4 |
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 |
4 | # JSON-LD 1.1*
5 |
6 | This is the repository describes extensions to [JSON-LD 1.1][], [JSON-LD 1.1 API][], and [JSON-LD 1.1 Framing][] to support triples as node identifiers as defined by [RDF-star]
7 | developed by the [JSON for Linking Data Community Group](https://www.w3.org/community/json-ld/). The editors’ draft of the Note can also be [read directly](https://json-ld.github.io/json-ld-star/).
8 |
9 | The JSON-LD-star Test Suite is a set of tests that can
10 | be used to verify JSON-LD Processor for the RDF-star extensions to JSON-LD.
11 |
12 | More information and an RDFS definition of the test vocabulary can be found at [vocab](https://w3c.github.io/json-ld-api/tests/vocab).
13 |
14 | ## General instructions for running the JSON-LD Test suites
15 |
16 | 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.
17 |
18 | ## Running tests
19 |
20 | The top-level [manifest](manifest.jsonld) references the specific test manifests, which in turn reference each test associated with a particular type of behavior.
21 |
22 | Implementations create their own infrastructure for running the test suite. In particular, the following should be considered:
23 |
24 | * For JSON-Ld-star tests, the `specVersion` is set to `JSON-LD-star`.
25 | * 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.
26 |
27 | ## Contributing Tests
28 |
29 | If you would like to contribute a new test or a fix to an existing test,
30 | please follow these steps:
31 |
32 | 1. Notify the JSON-LD Community mailing list, public-linked-json@w3.org,
33 | that you will be creating a new test or fix and the purpose of the
34 | change.
35 | 2. Clone the git repository: git://github.com/json-ld/json-ld-star.git
36 | 3. Make your changes and submit them via github, or via a 'git format-patch'
37 | to the [JSON-LD Community Group mailing list](mailto:public-linked-json@w3.org).
38 |
39 | ## Distribution
40 |
41 | Distributed under the [W3C Test Suite License](http://www.w3.org/Consortium/Legal/2008/04-testsuite-license). To contribute to a W3C Test Suite, see the [policies and contribution forms](http://www.w3.org/2004/10/27-testcases).
42 |
43 | ## Disclaimer
44 |
45 | 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.
46 | 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.
47 |
48 | ## Code of Conduct
49 |
50 | W3C functions under a [code of conduct](https://www.w3.org/Consortium/cepc/).
51 |
52 | [RDF-star]: https://w3c.github.io/rdf-star/rdf-star-cg-spec.html
53 | [JSON-LD 1.1]: https://w3.org/TR/json-ld11
54 | [JSON-LD 1.1 API]: https://w3.org/TR/json-ld11-api
55 | [JSON-LD 1.1 Framing]: https://w3.org/TR/json-ld11-framing
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | require 'bundler/setup'
2 | task default: :test
3 |
4 | desc "Test examples in spec files"
5 | task :test do
6 | sh %(bundle exec common/extract-examples.rb index.html)
7 | end
8 |
9 | desc "Extract Examples"
10 | task :examples do
11 | sh %(rm -rf examples yaml)
12 | sh %(bundle exec common/extract-examples.rb --example-dir examples --yaml-dir yaml index.html)
13 | end
14 |
15 | desc "Check HTML"
16 | task :check_html do
17 | require 'nokogiri'
18 | doc = ::Nokogiri::HTML5(File.open("index.html"), max_parse_errors: 1000)
19 | unless doc.errors.empty?
20 | STDERR.puts "Errors found parsing index.html:"
21 | doc.errors.each {|e| STDERR.puts " #{e}"}
22 | exit(1)
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/common/README.rb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/json-ld/json-ld-star/02022d6d8733a752fa0fa30d7ab7be0fc73a4f5c/common/README.rb
--------------------------------------------------------------------------------
/common/algorithm-terms.html:
--------------------------------------------------------------------------------
1 |
2 | active graph
3 | The name of the currently active graph that the processor should use when processing.
4 | active object
5 | The currently active object that the processor should use when processing.
6 | active property
7 | The currently active property or keyword that the processor should use when processing.
8 | The active property is represented in the original lexical form,
9 | which is used for finding coercion mappings in the active context .
10 | active subject
11 | The currently active subject that the processor should use when processing.
12 | add value
13 |
14 | Used as a macro within various algorithms as a way to add a value
15 | to an entry in a map (object ) using a specified key .
16 | The invocation may include an as array flag defaulting to false
.
17 |
18 | If as array is true
19 | and the value of key in object does not exist
20 | or is not an array , set it to a new array
21 | containing any original value.
22 | If value is an array ,
23 | then for each element v in value ,
24 | use add value recursively to add v to key in entry .
25 | Otherwise:
26 |
27 | If key is not an entry in object ,
28 | add value as the value of key in object .
29 | Otherwise
30 |
31 | If the value of the key entry in object is not an array ,
32 | set it to a new array containing the original value.
33 | Append value
34 | to the value of the key entry in object .
35 |
36 |
37 |
38 |
39 |
40 |
41 | explicit inclusion flag
42 | A flag specifying that for properties to be included in the output,
43 | they must be explicitly declared in the matching frame .
44 | framing state
45 | A map containing values for
46 | the object embed flag ,
47 | the require all flag ,
48 | the embedded flag ,
49 | used internally to help determine if object embedding is appropriate,
50 | the explicit inclusion flag ,
51 | and the omit default flag .
52 | IRI compacting
53 |
54 | Used as a macro within various algorithms as to reduce the language used to describe
55 | the process of compacting a string var representing an IRI or keyword
56 | using an active context either specified directly, or coming from the scope of
57 | the algorithm step using this term.
58 | An optional value is used, if explicitly provided.
59 | Unless specified, the vocab flag defaults to `true`,
60 | and the reverse flag defaults to `false`.
61 |
62 | Return the result of using the IRI Compaction algorithm ,
63 | passing active context ,
64 | var ,
65 | value (if supplied),
66 | vocab ,
67 | and result .
68 |
69 |
70 | IRI expanding
71 |
72 | Used as a macro within various algorithms as to reduce the language used to describe
73 | the process of expanding a string value representing an IRI or keyword
74 | using an active context either specified directly, or coming from the scope of
75 | the algorithm step using this term.
76 | Optional defined and local context arguments are used, if explicitly provided.
77 | Unless specified,
78 | the document relative flag defaults to `false`,
79 | and the vocab flag defaults to `true`.
80 |
81 | Return the result of using the IRI Expansion algorithm ,
82 | passing active context ,
83 | value ,
84 | local context (if supplied),
85 | defined (if supplied),
86 | document relative ,
87 | and vocab .
88 |
89 |
90 | input frame
91 | The initial Frame provided to the framing algorithm.
92 | JSON-LD input
93 | The JSON-LD data structure that is provided as input to the algorithm.
94 | JSON-LD output
95 | The JSON-LD data structure that is produced as output by the algorithm.
96 | map of flattened subjects
97 | A map of subjects that is the result of the
98 | Node Map Generation algorithm .
99 | object embed flag
100 | A flag specifying that node objects should be directly embedded in the output,
101 | instead of being referred to by their IRI .
102 | omit default flag
103 | A flag specifying that properties that are missing from the JSON-LD input ,
104 | but present in the input frame ,
105 | should be omitted from the output.
106 | omit graph flag
107 | A flag that determines if framing output is always contained within a @graph
entry ,
108 | or only if required to represent multiple node objects .
109 | processor state
110 | The processor state ,
111 | which includes the active context , active subject , and active property .
112 | The processor state is managed as a stack with elements from the previous processor state
113 | copied into a new processor state when entering a new JSON object .
114 | require all flag
115 | A flag specifying that all properties present in the input frame
116 | must either have a default value
117 | or be present in the JSON-LD input
118 | for the frame to match.
119 |
120 |
--------------------------------------------------------------------------------
/common/common.js:
--------------------------------------------------------------------------------
1 | /* globals require */
2 | /* JSON-LD Working Group common spec JavaScript */
3 |
4 | /*
5 | * Implement tabbed examples.
6 | */
7 | require(["core/pubsubhub"], (respecEvents) => {
8 | "use strict";
9 |
10 | respecEvents.sub('end-all', (documentElement) => {
11 | // remove data-cite on where the citation is to ourselves.
12 | const selfDfns = Array.from(document.querySelectorAll("dfn[data-cite^='__SPEC__#']"));
13 | for (const dfn of selfDfns) {
14 | const anchor = dfn.querySelector('a');
15 | if (anchor) {
16 | const anchorContent = anchor.textContent;
17 | dfn.removeChild(anchor);
18 | dfn.textContent = anchorContent;
19 | }
20 | delete dfn.dataset.cite;
21 | }
22 |
23 | // Update data-cite references to ourselves.
24 | const selfRefs = document.querySelectorAll("a[data-cite^='__SPEC__#']");
25 | for (const anchor of selfRefs) {
26 | anchor.href= anchor.dataset.cite.replace(/^.*#/,"#");
27 | delete anchor.dataset.cite;
28 | }
29 |
30 | //
31 | // Remove/hide definitions which are unused
32 | // 1. Find all definitions in a termlist which are not preserved, indexed by data-cite
33 | // 2. Find all references to definitions not in termlist
34 | // 4. Hide definitions which are unreferenced
35 | //
36 | const remoteDfns = [];
37 | document.querySelectorAll(".termlist dfn:not(.preserve)")
38 | .forEach((item, index) => {
39 | if (!selfDfns.includes(item)) {
40 | remoteDfns[item.dataset["cite"]] = item;
41 | }
42 | });
43 |
44 | // termlist internal references to definitions
45 | const internalRefs = Array.from(document.querySelectorAll(".termlist a[data-cite]"));
46 |
47 | // all references to definitions which are not internal refs
48 | const allRefs = Array.from(document.querySelectorAll("a[data-cite]"))
49 | .filter(e => !internalRefs.includes(e));
50 |
51 | // Remove terms which are referenced
52 | for (const item of allRefs) {
53 | const cite = item.dataset["cite"];
54 | // Delete this from remoteDfns, as it is referenced
55 | delete remoteDfns[cite];
56 | }
57 |
58 | // Now remoteDfns only contains unreferenced terms
59 | for (const item of Object.values(remoteDfns)) {
60 | const dt = item.closest("dt");
61 | if(dt) {
62 | const dd = dt.nextElementSibling;
63 | // Note, removing messes up some ReSpec references, so hiding instead
64 | // dt.parentNode.removeChild(dt);
65 | // dd.parentNode.removeChild(dd);
66 | dt.hidden = true;
67 | dd.hidden = true;
68 | }
69 | }
70 |
71 | //
72 | // Playground
73 | //
74 |
75 | // Add playground links
76 | for (const link of document.querySelectorAll("a.playground")) {
77 | let pre;
78 | if (link.dataset.resultFor) {
79 | // Referenced pre element
80 | pre = document.querySelector(link.dataset.resultFor + ' > pre');
81 | } else {
82 | // First pre element of aside
83 | pre = link.closest("aside").querySelector("pre");
84 | }
85 | const content = unComment(document, pre.textContent)
86 | .replace(/\*\*\*\*/g, '')
87 | .replace(/####([^#]*)####/g, '');
88 | link.setAttribute('aria-label', 'playground link');
89 | link.textContent = "Open in playground";
90 |
91 | // startTab defaults to "expand"
92 | const linkQueryParams = {
93 | startTab: "tab-expand",
94 | "json-ld": content
95 | }
96 |
97 | if (link.dataset.compact !== undefined) {
98 | linkQueryParams.startTab = "tab-" + "compacted";
99 | linkQueryParams.context = '{}';
100 | }
101 |
102 | if (link.dataset.flatten !== undefined) {
103 | linkQueryParams.startTab = "tab-" + "flattened";
104 | linkQueryParams.context = '{}';
105 | }
106 |
107 | if (link.dataset.frame !== undefined) {
108 | linkQueryParams.startTab = "tab-" + "framed";
109 | const frameContent = unComment(document, document.querySelector(link.dataset.frame + ' > pre').textContent)
110 | .replace(/\*\*\*\*/g, '')
111 | .replace(/####([^#]*)####/g, '');
112 | linkQueryParams.frame = frameContent;
113 | }
114 |
115 | // Set context
116 | if (link.dataset.context) {
117 | const contextContent = unComment(document, document.querySelector(link.dataset.context + ' > pre').textContent)
118 | .replace(/\*\*\*\*/g, '')
119 | .replace(/####([^#]*)####/g, '');
120 | linkQueryParams.context = contextContent;
121 | }
122 |
123 | link.setAttribute('href',
124 | 'https://json-ld.org/playground/#' +
125 | Object.keys(linkQueryParams).map(k => `${encodeURIComponent(k)}=${encodeURIComponent(linkQueryParams[k])}`)
126 | .join('&'));
127 | }
128 |
129 | // Add highlighting and remove comment from pre elements
130 | for (const pre of document.querySelectorAll("pre")) {
131 | // First pre element of aside
132 | const content = pre.innerHTML
133 | .replace(/\*\*\*\*([^*]*)\*\*\*\*/g, '$1 ')
134 | .replace(/####([^#]*)####/g, '');
135 | pre.innerHTML = content;
136 | }
137 | });
138 | });
139 |
140 | function _esc(s) {
141 | return s.replace(/&/g,'&')
142 | .replace(/>/g,'>')
143 | .replace(/"/g,'"')
144 | .replace(/ s.trim()).map(s => s.search(/[^\s]/));
154 | const leastIndent = Math.min(...indents);
155 | return lines.map(s => s.slice(leastIndent)).join("\n");
156 | }
157 |
158 | function updateExample(doc, content) {
159 | // perform transformations to make it render and prettier
160 | return _esc(reindent(unComment(doc, content)));
161 | }
162 |
163 |
164 | function unComment(doc, content) {
165 | // perform transformations to make it render and prettier
166 | return content
167 | .replace(//, '')
169 | .replace(/< !\s*-\s*-/g, '')
171 | .replace(/-\s*-\s*>/g, '-->');
172 | }
173 |
--------------------------------------------------------------------------------
/common/jsonld.js:
--------------------------------------------------------------------------------
1 | const jsonld = {
2 | // Add as the respecConfig localBiblio variable
3 | // Extend or override global respec references
4 | localBiblio: {
5 | // aliases to known references
6 | "JSON-LD10": {
7 | title: "JSON-LD 1.0",
8 | href: "https://www.w3.org/TR/2014/REC-json-ld-20140116/",
9 | publisher: "W3C",
10 | date: "16 January 2014",
11 | status: "W3C Recommendation",
12 | authors: [
13 | "Manu Sporny",
14 | "Gregg Kellogg",
15 | "Marcus Langhaler"
16 | ]
17 | },
18 | "JSON-LD10-API": {
19 | title: "JSON-LD 1.0 Processing Algorithms And API",
20 | href: "https://www.w3.org/TR/2014/REC-json-ld-api-20140116/",
21 | publisher: "W3C",
22 | date: "16 January 2014",
23 | status: "W3C Recommendation",
24 | authors: [
25 | "Marcus Langhaler",
26 | "Gregg Kellogg",
27 | "Manu Sporny"
28 | ]
29 | },
30 | "JSON-LD10-FRAMING": {
31 | title: "JSON-LD Framing 1.0",
32 | href: "https://json-ld.org/spec/ED/json-ld-framing/20120830/",
33 | publisher: "W3C",
34 | date: "30 August 2012",
35 | status: "Unofficial Draft",
36 | authors: [
37 | "Manu Sporny",
38 | "Gregg Kellogg",
39 | "David Longley",
40 | "Marcus Langhaler"
41 | ]
42 | },
43 | "IEEE-754-2008": {
44 | title: "IEEE 754-2008 Standard for Floating-Point Arithmetic",
45 | href: "http://standards.ieee.org/findstds/standard/754-2008.html",
46 | publisher: "Institute of Electrical and Electronics Engineers",
47 | date: "2008"
48 | },
49 | "JSON.API": {
50 | title: "JSON API",
51 | href: "https://jsonapi.org/format/",
52 | authors: [
53 | 'Steve Klabnik',
54 | 'Yehuda Katz',
55 | 'Dan Gebhardt',
56 | 'Tyler Kellen',
57 | 'Ethan Resnick'
58 | ],
59 | status: 'unofficial',
60 | date: '29 May 2015'
61 | },
62 | "RFC8785": {
63 | title: "JSON Canonicalization Scheme (JCS)",
64 | href: 'https://www.rfc-editor.org/rfc/rfc8785',
65 | authors: ['A. Rundgren', 'B. Jordan', 'S. Erdtman'],
66 | publisher: 'Network Working Group',
67 | status: 'Informational',
68 | date: 'June 2020'
69 | },
70 | // These necessary as specref uses the wrong URLs
71 | "RFC7231": {
72 | title: 'Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content',
73 | href: 'https://tools.ietf.org/html/rfc7231',
74 | authors: ['R. Fielding, Ed.', 'J. Reschke, Ed'],
75 | pubisher: 'IETF',
76 | status: 'Proposed Standard',
77 | date: 'June 2014'
78 | },
79 | "RFC8288": {
80 | title: 'Web Linking',
81 | href: 'https://tools.ietf.org/html/rfc8288',
82 | authors: ['M. Nottingham'],
83 | pubisher: 'IETF',
84 | status: 'Proposed Standard',
85 | date: 'October 2017'
86 | },
87 | }
88 | };
89 |
--------------------------------------------------------------------------------
/common/typographical-conventions.html:
--------------------------------------------------------------------------------
1 | The following typographic conventions are used in this specification:
2 |
3 |
4 | markup
5 | Markup (elements, attributes, properties),
6 | machine processable values (string, characters, media types),
7 | property name,
8 | or a file name is in red-orange monospace font.
9 | variable
10 | A variable in pseudo-code or in an algorithm description is in italics.
11 | definition
12 | A definition of a term, to be used elsewhere in this or other specifications,
13 | is in bold and italics.
14 | definition reference
15 | A reference to a definition in this document
16 | is underlined and is also an active link to the definition itself.
17 | markup definition reference
18 | References to a definition in this document ,
19 | when the reference itself is also a markup, is underlined,
20 | red-orange monospace font, and is also an active link to the definition itself.
21 | external definition reference
22 | A reference to a definition in another document
23 | is underlined, in italics, and is also an active link to the definition itself.
24 | markup external definition reference
25 | A reference to a definition in another document ,
26 | when the reference itself is also a markup,
27 | is underlined, in italics red-orange monospace font,
28 | and is also an active link to the definition itself.
29 | hyperlink
30 | A hyperlink is underlined and in blue.
31 | [reference ]
32 | A document reference (normative or informative) is enclosed in square brackets
33 | and links to the references section.
34 | Changes from Recommendation
35 | Sections or phrases changed from the previous Recommendation
36 | may be highlighted using a control
37 | in .
38 |
39 |
40 | Notes are in light green boxes with a green left border and with a "Note" header in green.
41 | Notes are always informative.
42 |
43 |
44 | Examples are in light khaki boxes, with khaki left border,
45 | and with a numbered "Example" header in khaki.
46 | Examples are always informative. The content of the example is in monospace font and may be syntax colored.
47 |
48 | Examples may have tabbed navigation buttons
49 | to show the results of transforming an example into other representations.
50 |
51 |
--------------------------------------------------------------------------------
/reports/.earl:
--------------------------------------------------------------------------------
1 | ---
2 | :format: :json
3 | :manifest: manifests.nt
4 | :bibRef: ! '[[json-ld-star]]'
5 | :name: JSON-LD*
6 | :query: |
7 | PREFIX mf:
8 | PREFIX rdf:
9 | PREFIX jld:
10 |
11 | SELECT ?uri ?testAction ?manUri
12 | WHERE {
13 | ?uri mf:action ?testAction .
14 | OPTIONAL {
15 | ?uri jld:option [jld:specVersion ?version] .
16 | }
17 | OPTIONAL {
18 | ?manUri a mf:Manifest; mf:entries ?lh .
19 | ?lh rdf:first ?uri .
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/reports/README.md:
--------------------------------------------------------------------------------
1 | This is a collection of individual
2 | [EARL reports](https://www.w3.org/TR/EARL10-Schema/) for
3 | test subjects claiming JSON-LD processor conformance.
4 |
5 | The consolidated report is saved to `index.html` generated
6 | using the
7 | [earl-report Ruby gem](https://rubygems.org/gems/earl-report).
8 | Run it as follows:
9 |
10 | ```sh
11 | $ gem install earl-report
12 | $ rm -f manifests.nt && (cd ..; rake reports/manifests.nt)
13 | $ earl-report --format json -o earl.jsonld *.ttl
14 | $ earl-report --json --format html --template template.haml -o index.html earl.jsonld
15 | ```
16 |
--------------------------------------------------------------------------------
/reports/Rakefile:
--------------------------------------------------------------------------------
1 | task default: [ "manifests.nt", "earl.jsonld", "index.html" ]
2 |
3 | desc "Create concatenated test manifests"
4 | file "manifests.nt" do
5 | require 'rdf'
6 | require 'json/ld'
7 | require 'rdf/ntriples'
8 | graph = RDF::Graph.new do |g|
9 | %w( https://json-ld.github.io/json-ld-star/tests/compact-manifest.jsonld
10 | https://json-ld.github.io/json-ld-star/tests/expand-manifest.jsonld
11 | https://json-ld.github.io/json-ld-star/tests/flatten-manifest.jsonld
12 | https://json-ld.github.io/json-ld-star/tests/fromRdf-manifest.jsonld
13 | https://json-ld.github.io/json-ld-star/tests/toRdf-manifest.jsonld
14 | ).each do |man|
15 | puts "load #{man}"
16 | file = man.sub('https://json-ld.github.io/json-ld-star/', File.expand_path("../..", __FILE__) + '/')
17 | g.load(man, unique_bnodes: true, base: man)
18 | end
19 | end
20 | puts "write manifests.nt"
21 | RDF::NTriples::Writer.open("manifests.nt", unique_bnodes: true, validate: false) {|w| w << graph}
22 | end
23 |
24 | file "earl.jsonld" => %w(manifests.nt) do
25 | puts "write earl.jsonld"
26 | %x(earl-report --format json -o earl.jsonld *.ttl)
27 | end
28 |
29 | file "index.html" => %w(template.haml earl.jsonld) do
30 | puts "write index.html"
31 | %x(earl-report --json --format html --template template.haml -o index.html earl.jsonld)
32 | end
33 |
--------------------------------------------------------------------------------
/tests/LICENSE.md:
--------------------------------------------------------------------------------
1 | The JSON-LD Test Suite is covered by the dual-licensing approach described in
2 | [LICENSES FOR W3C TEST SUITES](https://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html).
3 |
--------------------------------------------------------------------------------
/tests/README.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | The JSON-LD-star Test Suite is a set of tests that can
4 | be used to verify JSON-LD Processor for the RDF-star extensions to JSON-LD.
5 |
6 | More information and an RDFS definition of the test vocabulary can be found at [vocab](https://w3c.github.io/json-ld-api/tests/vocab).
7 |
8 | # Design
9 |
10 | 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.
11 |
12 | Tests driven from a top-level [manifest](manifest.jsonld) and are defined into [compact](compact-manifest.jsonld), [expand](expand-manifest.jsonld), [flatten](flatten-manifest.jsonld), [fromRdf](fromRdf-manifest.jsonld), and [toRdf](toRdf-manifest.jsonld) sections:
13 |
14 | # Running tests
15 |
16 | The top-level [manifest](manifest.jsonld) references the specific test manifests, which in turn reference each test associated with a particular type of behavior.
17 |
18 | Implementations create their own infrastructure for running the test suite. In particular, the following should be considered:
19 |
20 | * Tests may also have a `requires` property, indicating some optional behavior described by a test vocabulary term.
21 |
22 | # Contributing
23 |
24 | If you would like to contribute a new test or a fix to an existing test,
25 | please follow these steps:
26 |
27 | 1. Notify the JSON-LD Community mailing list, public-linked-json@w3.org,
28 | that you will be creating a new test or fix and the purpose of the
29 | change.
30 | 2. Clone the git repository: git://github.com/json-ld/json-ld-star.git
31 | 3. Make your changes and submit them via github, or via a 'git format-patch'
32 | to the [JSON-LD Community Group mailing list](mailto:public-linked-json@w3.org).
33 |
34 | # Distribution
35 | Distributed under the [W3C Test Suite License](http://www.w3.org/Consortium/Legal/2008/04-testsuite-license). To contribute to a W3C Test Suite, see the [policies and contribution forms](http://www.w3.org/2004/10/27-testcases).
36 |
37 | # Disclaimer
38 | 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.
39 | 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.
40 |
--------------------------------------------------------------------------------
/tests/Rakefile:
--------------------------------------------------------------------------------
1 | require 'bundler/setup'
2 | require 'haml'
3 | require 'htmlbeautifier'
4 | require 'json'
5 | task default: %w(
6 | manifest.html
7 | compact-manifest.html
8 | expand-manifest.html
9 | flatten-manifest.html
10 | fromRdf-manifest.html
11 | toRdf-manifest.html)
12 |
13 | # Rule to build HTML files
14 | rule '.html' => ['.jsonld', 'template.haml'] do |task|
15 | puts "build #{task.name} from #{task.prerequisites.first}"
16 | @template ||= File.read(File.expand_path('../template.haml', __FILE__))
17 | @engine ||= Haml::Template.new(format: :html5) {@template}
18 | manifest = JSON.parse File.read(File.expand_path("../#{task.prerequisites.first}", __FILE__))
19 | html = @engine.render(self, manifest: manifest, json_file: task.prerequisites.first)
20 | html = HtmlBeautifier.beautify(html) if defined?(::HtmlBeautifier)
21 | File.open(File.expand_path("../#{task.name}", __FILE__), "w") {|f| f.write(html)}
22 | end
23 |
--------------------------------------------------------------------------------
/tests/compact-manifest.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": ["context.jsonld", {"@base": "compact-manifest"}],
3 | "@id": "",
4 | "@type": "mf:Manifest",
5 | "name": "Compaction",
6 | "description": "These tests implement the requirements for the JSON-LD-star [Compaction Algorithm](https://json-ld.github.io/json-ld-star#compaction-algorithm).",
7 | "baseIri": "https://json-ld.github.io/json-ld-star/tests/",
8 | "sequence": [
9 | {
10 | "@id": "#tst04",
11 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
12 | "name": "embedded node 1",
13 | "purpose": "Node with embedded subject having no @id",
14 | "input": "compact/st04-in.jsonld",
15 | "context": "compact/st04-out.jsonld",
16 | "expect": "compact/st04-out.jsonld",
17 | "requires": "JSON-LD-star",
18 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
19 | }, {
20 | "@id": "#tst05",
21 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
22 | "name": "embedded node 2",
23 | "purpose": "Node with embedded subject having IRI @id",
24 | "input": "compact/st05-in.jsonld",
25 | "context": "compact/st05-out.jsonld",
26 | "expect": "compact/st05-out.jsonld",
27 | "requires": "JSON-LD-star",
28 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
29 | }, {
30 | "@id": "#tst06",
31 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
32 | "name": "embedded node 3",
33 | "purpose": "Node with embedded subject having BNode @id",
34 | "input": "compact/st06-in.jsonld",
35 | "context": "compact/st06-out.jsonld",
36 | "expect": "compact/st06-out.jsonld",
37 | "requires": "JSON-LD-star",
38 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
39 | }, {
40 | "@id": "#tst07",
41 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
42 | "name": "embedded node 4",
43 | "purpose": "Node with embedded subject having a type",
44 | "input": "compact/st07-in.jsonld",
45 | "context": "compact/st07-out.jsonld",
46 | "expect": "compact/st07-out.jsonld",
47 | "requires": "JSON-LD-star",
48 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
49 | }, {
50 | "@id": "#tst08",
51 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
52 | "name": "embedded node 5",
53 | "purpose": "Node with embedded subject having an IRI value",
54 | "input": "compact/st08-in.jsonld",
55 | "context": "compact/st08-out.jsonld",
56 | "expect": "compact/st08-out.jsonld",
57 | "requires": "JSON-LD-star",
58 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
59 | }, {
60 | "@id": "#tst09",
61 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
62 | "name": "embedded node 6",
63 | "purpose": "Node with embedded subject having an BNode value",
64 | "input": "compact/st09-in.jsonld",
65 | "context": "compact/st09-out.jsonld",
66 | "expect": "compact/st09-out.jsonld",
67 | "requires": "JSON-LD-star",
68 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
69 | }, {
70 | "@id": "#tst10",
71 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
72 | "name": "embedded node 7",
73 | "purpose": "Node with recursive embedded subject",
74 | "input": "compact/st10-in.jsonld",
75 | "context": "compact/st10-out.jsonld",
76 | "expect": "compact/st10-out.jsonld",
77 | "requires": "JSON-LD-star",
78 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
79 | }, {
80 | "@id": "#tst15",
81 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
82 | "name": "embedded node 8",
83 | "purpose": "Node with embedded object",
84 | "input": "compact/st15-in.jsonld",
85 | "context": "compact/st15-out.jsonld",
86 | "expect": "compact/st15-out.jsonld",
87 | "requires": "JSON-LD-star",
88 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
89 | }, {
90 | "@id": "#tst16",
91 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
92 | "name": "embedded node 9",
93 | "purpose": "Node with embedded object having properties",
94 | "input": "compact/st16-in.jsonld",
95 | "context": "compact/st16-out.jsonld",
96 | "expect": "compact/st16-out.jsonld",
97 | "requires": "JSON-LD-star",
98 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
99 | }, {
100 | "@id": "#tst17",
101 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
102 | "name": "embedded node 10",
103 | "purpose": "Node with recursive embedded object",
104 | "input": "compact/st17-in.jsonld",
105 | "context": "compact/st17-out.jsonld",
106 | "expect": "compact/st17-out.jsonld",
107 | "requires": "JSON-LD-star",
108 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
109 | }, {
110 | "@id": "#tst18",
111 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
112 | "name": "Annotation node 1",
113 | "purpose": "Node with @annotation property on value object",
114 | "input": "compact/st18-in.jsonld",
115 | "context": "compact/st18-out.jsonld",
116 | "expect": "compact/st18-out.jsonld",
117 | "requires": "JSON-LD-star",
118 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
119 | }, {
120 | "@id": "#tst19",
121 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
122 | "name": "Annotation node 2",
123 | "purpose": "Node with @annotation property on node object",
124 | "input": "compact/st19-in.jsonld",
125 | "context": "compact/st19-out.jsonld",
126 | "expect": "compact/st19-out.jsonld",
127 | "requires": "JSON-LD-star",
128 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
129 | }, {
130 | "@id": "#tst20",
131 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
132 | "name": "Annotation node 3",
133 | "purpose": "Node with @annotation property multiple values",
134 | "input": "compact/st20-in.jsonld",
135 | "context": "compact/st20-out.jsonld",
136 | "expect": "compact/st20-out.jsonld",
137 | "requires": "JSON-LD-star",
138 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
139 | }, {
140 | "@id": "#tst20a",
141 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
142 | "name": "Annotation node 4",
143 | "purpose": "Node with @annotation property containing multiple properties",
144 | "input": "compact/st20a-in.jsonld",
145 | "context": "compact/st20a-out.jsonld",
146 | "expect": "compact/st20a-out.jsonld",
147 | "requires": "JSON-LD-star",
148 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
149 | }, {
150 | "@id": "#tst20b",
151 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
152 | "name": "Annotation node 5",
153 | "purpose": "Node with @annotation property containing an empty node object",
154 | "input": "compact/st20b-in.jsonld",
155 | "context": "compact/st20b-out.jsonld",
156 | "expect": "compact/st20b-out.jsonld",
157 | "requires": "JSON-LD-star",
158 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
159 | }, {
160 | "@id": "#tst28",
161 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
162 | "name": "Embedded annotation node 1",
163 | "purpose": "Node with @annotation property on embedded subject",
164 | "input": "compact/st28-in.jsonld",
165 | "context": "compact/st28-out.jsonld",
166 | "expect": "compact/st28-out.jsonld",
167 | "requires": "JSON-LD-star",
168 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
169 | }, {
170 | "@id": "#tst29",
171 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
172 | "name": "Embedded annotation node 2",
173 | "purpose": "Node with @annotation property on embedded object",
174 | "input": "compact/st29-in.jsonld",
175 | "context": "compact/st29-out.jsonld",
176 | "expect": "compact/st29-out.jsonld",
177 | "requires": "JSON-LD-star",
178 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
179 | }, {
180 | "@id": "#tst32",
181 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
182 | "name": "embedded node 13",
183 | "purpose": "Embedded node used as subject in reverse relationship",
184 | "input": "compact/st32-in.jsonld",
185 | "context": "compact/st32-out.jsonld",
186 | "expect": "compact/st32-out.jsonld",
187 | "requires": "JSON-LD-star",
188 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
189 | }, {
190 | "@id": "#tst33",
191 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
192 | "name": "embedded node 14",
193 | "purpose": "Embedded node used as object in reverse relationship",
194 | "input": "compact/st33-in.jsonld",
195 | "context": "compact/st33-out.jsonld",
196 | "expect": "compact/st33-out.jsonld",
197 | "requires": "JSON-LD-star",
198 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
199 | }, {
200 | "@id": "#tst34",
201 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
202 | "name": "Reverse annotation node 1",
203 | "purpose": "node with @annotation property on node object with reverse relationship",
204 | "input": "compact/st34-in.jsonld",
205 | "context": "compact/st34-out.jsonld",
206 | "expect": "compact/st34-out.jsonld",
207 | "requires": "JSON-LD-star",
208 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
209 | }, {
210 | "@id": "#tst35",
211 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
212 | "name": "Reverse annotation node 2",
213 | "purpose": "reverse relationship inside annotation",
214 | "input": "compact/st35-in.jsonld",
215 | "context": "compact/st35-out.jsonld",
216 | "expect": "compact/st35-out.jsonld",
217 | "requires": "JSON-LD-star",
218 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
219 | }, {
220 | "@id": "#tst36",
221 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
222 | "name": "Alias for embedded node",
223 | "purpose": "embedded node with an alias of `@id`",
224 | "input": "compact/st36-in.jsonld",
225 | "context": "compact/st36-out.jsonld",
226 | "expect": "compact/st36-out.jsonld",
227 | "requires": "JSON-LD-star",
228 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
229 | }, {
230 | "@id": "#tst37",
231 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
232 | "name": "Alias for annotation node",
233 | "purpose": "annotation node with an alias of `@annotation`",
234 | "input": "compact/st37-in.jsonld",
235 | "context": "compact/st37-out.jsonld",
236 | "expect": "compact/st37-out.jsonld",
237 | "requires": "JSON-LD-star",
238 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
239 | }, {
240 | "@id": "#tst38",
241 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
242 | "name": "annotation value 1",
243 | "purpose": "embedded node with annotation on value object",
244 | "input": "compact/st38-in.jsonld",
245 | "context": "compact/st38-out.jsonld",
246 | "expect": "compact/st38-out.jsonld",
247 | "requires": "JSON-LD-star",
248 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
249 | }, {
250 | "@id": "#tst39",
251 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
252 | "name": "annotation with embedded node 1",
253 | "purpose": "annotation node containing an embedded node",
254 | "input": "compact/st39-in.jsonld",
255 | "context": "compact/st39-out.jsonld",
256 | "expect": "compact/st39-out.jsonld",
257 | "requires": "JSON-LD-star",
258 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
259 | }, {
260 | "@id": "#tst40",
261 | "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
262 | "name": "annotation with annotation 1",
263 | "purpose": "annotation node containing an annotation node",
264 | "input": "compact/st40-in.jsonld",
265 | "context": "compact/st40-out.jsonld",
266 | "expect": "compact/st40-out.jsonld",
267 | "requires": "JSON-LD-star",
268 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
269 | }
270 | ]
271 | }
272 |
--------------------------------------------------------------------------------
/tests/compact/st04-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "ex:prop": [{"@value": "value"}]
4 | },
5 | "ex:prop": [{"@value": "value2"}]
6 | }]
--------------------------------------------------------------------------------
/tests/compact/st04-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "ex:prop": "value"
4 | },
5 | "ex:prop": "value2"
6 | }
--------------------------------------------------------------------------------
/tests/compact/st05-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/compact/st05-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/compact/st06-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "_:rei",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/compact/st06-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "_:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/compact/st07-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": ["ex:Type"]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/compact/st07-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": "ex:Type"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/compact/st08-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "ex:value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/compact/st08-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "ex:value"}
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/compact/st09-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/compact/st09-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "_:value"}
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/compact/st10-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": {
4 | "@id": "ex:rei",
5 | "ex:prop": [{"@value": "value3"}]
6 | },
7 | "ex:prop": [{"@value": "value"}]
8 | },
9 | "ex:prop": [{"@value": "value2"}]
10 | }]
--------------------------------------------------------------------------------
/tests/compact/st10-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": {
4 | "@id": "ex:rei",
5 | "ex:prop": "value3"
6 | },
7 | "ex:prop": "value"
8 | },
9 | "ex:prop": "value2"
10 | }
--------------------------------------------------------------------------------
/tests/compact/st15-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | }
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/compact/st15-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/compact/st16-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | },
8 | "ex:prop": [{"@value": "value2"}]
9 | }]
10 | }]
--------------------------------------------------------------------------------
/tests/compact/st16-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | },
8 | "ex:prop": "value2"
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/compact/st17-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": [{"@value": "value3"}]
8 | },
9 | "ex:prop":[{"@value": "value"}]
10 | },
11 | "ex:prop": [{"@value": "value2"}]
12 | }]
13 | }]
--------------------------------------------------------------------------------
/tests/compact/st17-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": "value3"
8 | },
9 | "ex:prop": "value"
10 | },
11 | "ex:prop": "value2"
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/compact/st18-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{
4 | "@value": 23,
5 | "@annotation": [{"ex:certainty": [{"@value": 0.8}]}]
6 | }]
7 | }]
--------------------------------------------------------------------------------
/tests/compact/st18-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation"
4 | },
5 | "@id": "ex:bob",
6 | "ex:age": {
7 | "@value": 23,
8 | "annotation": {"ex:certainty": 0.8}
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/compact/st19-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "@annotation": [{"ex:certainty": [{"@value": 0.8}]}]
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/compact/st19-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation"
4 | },
5 | "@id": "ex:bob",
6 | "ex:name": "Bob",
7 | "ex:knows": {
8 | "@id": "ex:fred",
9 | "ex:name": "Fred",
10 | "annotation": {"ex:certainty": 0.8}
11 | }
12 | }
--------------------------------------------------------------------------------
/tests/compact/st20-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "@annotation": [{
8 | "ex:certainty": [{"@value": 0.8}]
9 | }, {
10 | "ex:source": [{"@id": "http://example.org/"}]
11 | }]
12 | }]
13 | }]
--------------------------------------------------------------------------------
/tests/compact/st20-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation",
4 | "source": {"@id": "ex:source", "@type": "@id"}
5 | },
6 | "@id": "ex:bob",
7 | "ex:name": "Bob",
8 | "ex:knows": {
9 | "@id": "ex:fred",
10 | "ex:name": "Fred",
11 | "annotation": [{
12 | "ex:certainty": 0.8
13 | }, {
14 | "source": "http://example.org/"
15 | }]
16 | }
17 | }
--------------------------------------------------------------------------------
/tests/compact/st20a-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "@annotation": [{
8 | "ex:certainty": [{"@value": 0.8}],
9 | "ex:source": [{"@id": "http://example.org/"}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/compact/st20a-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation",
4 | "source": {"@id": "ex:source", "@type": "@id"}
5 | },
6 | "@id": "ex:bob",
7 | "ex:name": "Bob",
8 | "ex:knows": {
9 | "@id": "ex:fred",
10 | "ex:name": "Fred",
11 | "annotation": {
12 | "ex:certainty": 0.8,
13 | "source": "http://example.org/"
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/tests/compact/st20b-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "@annotation": [{}]
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/compact/st20b-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation"
4 | },
5 | "@id": "ex:bob",
6 | "ex:name": "Bob",
7 | "ex:knows": {
8 | "@id": "ex:fred",
9 | "ex:name": "Fred",
10 | "annotation": {}
11 | }
12 | }
--------------------------------------------------------------------------------
/tests/compact/st28-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:value"}]
5 | },
6 | "ex:prop": [{
7 | "@value": "value2",
8 | "@annotation": [{
9 | "ex:certainty": [{"@value": 0.8}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/compact/st28-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation"
4 | },
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": {"@id": "_:value"}
8 | },
9 | "ex:prop": {
10 | "@value": "value2",
11 | "annotation": {"ex:certainty": 0.8}
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/compact/st29-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | },
8 | "@annotation": [{
9 | "ex:certainty": [{"@value": 0.8}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/compact/st29-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation"
4 | },
5 | "@id": "ex:subj",
6 | "ex:value": {
7 | "@id": {
8 | "@id": "ex:rei",
9 | "ex:prop": "value"
10 | },
11 | "annotation": {"ex:certainty": 0.8}
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/compact/st32-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "ex:value"}]
5 | },
6 | "@reverse": {
7 | "ex:rel": [{"@id": "ex:value2"}]
8 | }
9 | }]
--------------------------------------------------------------------------------
/tests/compact/st32-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "rel": {"@reverse": "ex:rel"}
4 | },
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": {"@id": "ex:value"}
8 | },
9 | "rel": {"@id": "ex:value2"}
10 | }
--------------------------------------------------------------------------------
/tests/compact/st33-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "@reverse": {
4 | "ex:rel": [{
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": [{"@id": "ex:value"}]
8 | },
9 | "ex:prop": [{"@id": "ex:value2"}]
10 | }]
11 | }
12 | }]
--------------------------------------------------------------------------------
/tests/compact/st33-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "rel": {"@reverse": "ex:rel"}
4 | },
5 | "@id": "ex:subj",
6 | "rel": {
7 | "@id": {
8 | "@id": "ex:rei",
9 | "ex:prop": {"@id": "ex:value"}
10 | },
11 | "ex:prop": {"@id": "ex:value2"}
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/compact/st34-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "@reverse": {
5 | "ex:knows": [{
6 | "@id": "ex:fred",
7 | "ex:name": [{"@value": "Fred"}],
8 | "@annotation": [{"ex:certainty": [{"@value": 0.8}]}]
9 | }]
10 | }
11 | }]
--------------------------------------------------------------------------------
/tests/compact/st34-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation",
4 | "knownBy": {"@reverse": "ex:knows"}
5 | },
6 | "@id": "ex:bob",
7 | "ex:name": "Bob",
8 | "knownBy": {
9 | "@id": "ex:fred",
10 | "ex:name": "Fred",
11 | "annotation": {"ex:certainty": 0.8}
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/compact/st35-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:knows": [{
4 | "@id": "ex:jane",
5 | "@annotation": [{
6 | "ex:certainty": [{"@value": 0.8}],
7 | "@reverse": {
8 | "ex:claims": [{"@id": "ex:sue"}]
9 | }
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/compact/st35-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "annotation": "@annotation",
4 | "claims": {"@reverse": "ex:claims", "@type": "@id"}
5 | },
6 | "@id": "ex:bob",
7 | "ex:knows": {
8 | "@id": "ex:jane",
9 | "annotation": {
10 | "ex:certainty": 0.8,
11 | "claims": "ex:sue"
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/tests/compact/st36-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "ex:prop": [{"@value": "value"}]
4 | },
5 | "ex:prop": [{"@value": "value2"}]
6 | }]
--------------------------------------------------------------------------------
/tests/compact/st36-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "triple": "@id"
4 | },
5 | "triple": {
6 | "ex:prop": "value"
7 | },
8 | "ex:prop": "value2"
9 | }
--------------------------------------------------------------------------------
/tests/compact/st37-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{
4 | "@value": 23,
5 | "@annotation": [{"ex:certainty": [{"@value": 0.8}]}]
6 | }]
7 | }]
--------------------------------------------------------------------------------
/tests/compact/st37-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "metadata": "@annotation"
4 | },
5 | "@id": "ex:bob",
6 | "ex:age": {
7 | "@value": 23,
8 | "metadata": {"ex:certainty": 0.8}
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/compact/st38-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "http://example.org/bob",
4 | "http://example.org/knows": [{"@id": "http://example.org/alice"}]
5 | },
6 | "http://example.org/certainty": [{
7 | "@value": 0.8,
8 | "@annotation": [{
9 | "http://example.org/claims": [{"@id": "http://example.org/ted"}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/compact/st38-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@base": "http://example.org/",
4 | "@vocab": "http://example.org/",
5 | "metadata": "@annotation",
6 | "claims": {"@type": "@id"}
7 | },
8 | "@id": {
9 | "@id": "bob",
10 | "knows": {"@id": "alice"}
11 | },
12 | "certainty": {
13 | "@value": 0.8,
14 | "metadata": {"claims": "ted"}
15 | }
16 | }
--------------------------------------------------------------------------------
/tests/compact/st39-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{
4 | "@id": "ex:o",
5 | "@annotation": [{
6 | "ex:r": [{
7 | "@id": {
8 | "@id": "ex:s1",
9 | "ex:p1": [{"@id": "ex:o1"}]
10 | }
11 | }]
12 | }]
13 | }]
14 | }]
15 |
--------------------------------------------------------------------------------
/tests/compact/st39-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "ex:",
4 | "p1": {"@type": "@id"}
5 | },
6 | "@id": "ex:s",
7 | "p": {
8 | "@id": "ex:o",
9 | "@annotation": {
10 | "r": {
11 | "@id": {"@id": "ex:s1", "p1": "ex:o1"}
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/compact/st40-in.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{
4 | "@id": "ex:o",
5 | "@annotation": [{
6 | "ex:r": [{
7 | "@id": "ex:s1",
8 | "@annotation": [{
9 | "ex:p1": [{"@id": "ex:o1"}]
10 | }]
11 | }]
12 | }]
13 | }]
14 | }]
--------------------------------------------------------------------------------
/tests/compact/st40-out.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "ex:",
4 | "p1": {"@type": "@id"}
5 | },
6 | "@id": "ex:s",
7 | "p": {
8 | "@id": "ex:o",
9 | "@annotation": {
10 | "r": {
11 | "@id": "ex:s1",
12 | "@annotation": {
13 | "p1": "ex:o1"
14 | }
15 | }
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "https://w3c.github.io/json-ld-api/tests/vocab#",
4 | "dcterms": "http://purl.org/dc/terms/",
5 | "jld": "https://w3c.github.io/json-ld-api/tests/vocab#",
6 | "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",
7 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
8 | "xsd": "http://www.w3.org/2001/XMLSchema#",
9 |
10 | "context": { "@type": "@id" },
11 | "expect": { "@id": "mf:result", "@type": "@id" },
12 | "expectErrorCode": { "@id": "mf:result" },
13 | "frame": { "@type": "@id" },
14 | "input": { "@id": "mf:action", "@type": "@id" },
15 | "option": { "@type": "@id"},
16 | "sequence": { "@id": "mf:entries", "@type": "@id", "@container": "@list" },
17 | "redirectTo": { "@type": "@id"},
18 |
19 | "name": "mf:name",
20 | "purpose": "rdfs:comment",
21 | "description": "rdfs:comment",
22 | "base": { "@type": "@id" },
23 | "compactArrays": { "@type": "xsd:boolean" },
24 | "compactToRelative": { "@type": "xsd:boolean" },
25 | "contentType": { "@type": "xsd:string" },
26 | "expandContext": { "@type": "@id" },
27 | "extractAllScripts": { "@type": "xsd:boolean" },
28 | "httpLink": { "@type": "xsd:string", "@container": "@set" },
29 | "httpStatus": { "@type": "xsd:integer" },
30 | "normative": { "@type": "xsd:boolean" },
31 | "processingMode": { "@type": "xsd:string" },
32 | "processorFeature": { "@type": "xsd:string" },
33 | "produceGeneralizedRdf":{ "@type": "xsd:boolean" },
34 | "specVersion": { "@type": "xsd:string" },
35 | "useNativeTypes": { "@type": "xsd:boolean" }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tests/expand/st01-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/expand/st02-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:knows": {
4 | "@id": "ex:fred",
5 | "@annotation": {
6 | "ex:certainty": 0.8
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/expand/st02-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:knows": [{"@id": "ex:fred"}]
4 | }]
--------------------------------------------------------------------------------
/tests/expand/st03-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:age": {
4 | "@value": 23,
5 | "@annotation": {
6 | "ex:certainty": 0.8
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/expand/st03-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{"@value": 23}]
4 | }]
--------------------------------------------------------------------------------
/tests/expand/st04-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "ex:prop": "value"
4 | },
5 | "ex:prop": "value2"
6 | }
--------------------------------------------------------------------------------
/tests/expand/st04-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "ex:prop": [{"@value": "value"}]
4 | },
5 | "ex:prop": [{"@value": "value2"}]
6 | }]
--------------------------------------------------------------------------------
/tests/expand/st05-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/expand/st05-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/expand/st06-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "_:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/expand/st06-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "_:rei",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/expand/st07-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": "ex:Type"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/expand/st07-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": ["ex:Type"]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/expand/st08-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "ex:value"}
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/expand/st08-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "ex:value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/expand/st09-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "_:value"}
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/expand/st09-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/expand/st10-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": {
4 | "@id": "ex:rei",
5 | "ex:prop": "value3"
6 | },
7 | "ex:prop": "value"
8 | },
9 | "ex:prop": "value2"
10 | }
--------------------------------------------------------------------------------
/tests/expand/st10-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": {
4 | "@id": "ex:rei",
5 | "ex:prop": [{"@value": "value3"}]
6 | },
7 | "ex:prop": [{"@value": "value"}]
8 | },
9 | "ex:prop": [{"@value": "value2"}]
10 | }]
--------------------------------------------------------------------------------
/tests/expand/st11-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei"
4 | },
5 | "ex:prop": "value3"
6 | }
--------------------------------------------------------------------------------
/tests/expand/st12-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": ["value1", "value2"]
5 | },
6 | "ex:prop": "value3"
7 | }
--------------------------------------------------------------------------------
/tests/expand/st13-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": ["ex:Type1", "ex:Type2"]
5 | },
6 | "ex:prop": "value3"
7 | }
--------------------------------------------------------------------------------
/tests/expand/st14-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": "ex:Type",
5 | "ex:prop": "value"
6 | },
7 | "ex:prop": "value2"
8 | }
--------------------------------------------------------------------------------
/tests/expand/st15-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/expand/st15-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | }
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/expand/st16-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | },
8 | "ex:prop": "value2"
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/expand/st16-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | },
8 | "ex:prop": [{"@value": "value2"}]
9 | }]
10 | }]
--------------------------------------------------------------------------------
/tests/expand/st17-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": "value3"
8 | },
9 | "ex:prop": "value"
10 | },
11 | "ex:prop": "value2"
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/expand/st17-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": [{"@value": "value3"}]
8 | },
9 | "ex:prop":[{"@value": "value"}]
10 | },
11 | "ex:prop": [{"@value": "value2"}]
12 | }]
13 | }]
--------------------------------------------------------------------------------
/tests/expand/st18-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:age": {
4 | "@value": 23,
5 | "@annotation": {"ex:certainty": 0.8}
6 | }
7 | }
--------------------------------------------------------------------------------
/tests/expand/st18-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{
4 | "@value": 23,
5 | "@annotation": [{"ex:certainty": [{"@value": 0.8}]}]
6 | }]
7 | }]
--------------------------------------------------------------------------------
/tests/expand/st19-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "ex:knows": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": {"ex:certainty": 0.8}
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/expand/st19-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "@annotation": [{"ex:certainty": [{"@value": 0.8}]}]
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/expand/st20-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "ex:knows": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": [{
8 | "ex:certainty": 0.8
9 | }, {
10 | "ex:source": {"@id": "http://example.org/"}
11 | }]
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/expand/st20-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "@annotation": [{
8 | "ex:certainty": [{"@value": 0.8}]
9 | }, {
10 | "ex:source": [{"@id": "http://example.org/"}]
11 | }]
12 | }]
13 | }]
--------------------------------------------------------------------------------
/tests/expand/st20a-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "ex:knows": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": [{
8 | "ex:certainty": 0.8,
9 | "ex:source": {"@id": "http://example.org/"}
10 | }]
11 | }
12 | }
--------------------------------------------------------------------------------
/tests/expand/st20a-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "@annotation": [{
8 | "ex:certainty": [{"@value": 0.8}],
9 | "ex:source": [{"@id": "http://example.org/"}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/expand/st20b-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "ex:knows": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": {}
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/expand/st20b-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "@annotation": [{}]
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/expand/st21-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "@annotation": {"ex:prop": "value2"}
5 | }
--------------------------------------------------------------------------------
/tests/expand/st22-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "@graph": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": {"ex:prop": "value2"}
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/expand/st23-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:knows": {
4 | "@id": "ex:fred",
5 | "@annotation": {
6 | "@id": "ex:invalid-ann-id",
7 | "ex:prop": "value2"
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/expand/st24-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:knows": {
4 | "@id": "fred",
5 | "@annotation": "value2"
6 | }
7 | }
--------------------------------------------------------------------------------
/tests/expand/st24a-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:knows": {
4 | "@id": "fred",
5 | "@annotation": { "@value": "value2" }
6 | }
7 | }
--------------------------------------------------------------------------------
/tests/expand/st25-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:knows": {
4 | "@list": [{"@id": "ex:fred"}],
5 | "@annotation": { "ex:prop": "value2" }
6 | }
7 | }
--------------------------------------------------------------------------------
/tests/expand/st26-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:knows": {
4 | "@list": [
5 | {
6 | "@id": "ex:fred",
7 | "@annotation": { "ex:prop": "value2" }
8 | }
9 | ]
10 | }
11 | }
--------------------------------------------------------------------------------
/tests/expand/st27-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "@included": [{
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": {"ex:prop": "value2"}
8 | }]
9 | }
--------------------------------------------------------------------------------
/tests/expand/st27a-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:claims": {
4 | "@id": {
5 | "@id": "ex:fred",
6 | "name": "Fred",
7 | "@annotation": {
8 | "ex:certainty": 0.8
9 | }
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/tests/expand/st28-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "_:value"}
5 | },
6 | "ex:prop": {
7 | "@value": "value2",
8 | "@annotation": {"ex:certainty": 0.8}
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/expand/st28-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:value"}]
5 | },
6 | "ex:prop": [{
7 | "@value": "value2",
8 | "@annotation": [{
9 | "ex:certainty": [{"@value": 0.8}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/expand/st29-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | },
8 | "@annotation": {"ex:certainty": 0.8}
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/expand/st29-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | },
8 | "@annotation": [{
9 | "ex:certainty": [{"@value": 0.8}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/expand/st30-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "rel": {"@reverse": "ex:rel"}
4 | },
5 | "@id": {
6 | "@id": "ex:rei",
7 | "rel": {"@id": "ex:value"}
8 | },
9 | "ex:prop": "value2"
10 | }
--------------------------------------------------------------------------------
/tests/expand/st31-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@reverse": {
5 | "ex:rel": {"@id": "ex:value"}
6 | }
7 | },
8 | "ex:prop": "value2"
9 | }
--------------------------------------------------------------------------------
/tests/expand/st32-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "rel": {"@reverse": "ex:rel"}
4 | },
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": {"@id": "ex:value"}
8 | },
9 | "rel": {"@id": "ex:value2"}
10 | }
--------------------------------------------------------------------------------
/tests/expand/st32-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "ex:value"}]
5 | },
6 | "@reverse": {
7 | "ex:rel": [{"@id": "ex:value2"}]
8 | }
9 | }]
--------------------------------------------------------------------------------
/tests/expand/st33-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "rel": {"@reverse": "ex:rel"}
4 | },
5 | "@id": "ex:subj",
6 | "rel": {
7 | "@id": {
8 | "@id": "ex:rei",
9 | "ex:prop": {"@id": "ex:value"}
10 | },
11 | "ex:prop": {"@id": "ex:value2"}
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/expand/st33-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "@reverse": {
4 | "ex:rel": [{
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": [{"@id": "ex:value"}]
8 | },
9 | "ex:prop": [{"@id": "ex:value2"}]
10 | }]
11 | }
12 | }]
--------------------------------------------------------------------------------
/tests/expand/st34-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "knownBy": {"@reverse": "ex:knows"}
4 | },
5 | "@id": "ex:bob",
6 | "ex:name": "Bob",
7 | "knownBy": {
8 | "@id": "ex:fred",
9 | "ex:name": "Fred",
10 | "@annotation": {"ex:certainty": 0.8}
11 | }
12 | }
--------------------------------------------------------------------------------
/tests/expand/st34-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "@reverse": {
5 | "ex:knows": [{
6 | "@id": "ex:fred",
7 | "ex:name": [{"@value": "Fred"}],
8 | "@annotation": [{"ex:certainty": [{"@value": 0.8}]}]
9 | }]
10 | }
11 | }]
--------------------------------------------------------------------------------
/tests/expand/st35-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "claims": {"@reverse": "ex:claims", "@type": "@id"}
4 | },
5 | "@id": "ex:bob",
6 | "ex:knows": {
7 | "@id": "ex:jane",
8 | "@annotation": {
9 | "ex:certainty": 0.8,
10 | "claims": "ex:sue"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/expand/st35-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:knows": [{
4 | "@id": "ex:jane",
5 | "@annotation": [{
6 | "ex:certainty": [{"@value": 0.8}],
7 | "@reverse": {
8 | "ex:claims": [{"@id": "ex:sue"}]
9 | }
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/expand/st36-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "triple": "@id"
4 | },
5 | "triple": {
6 | "ex:prop": "value"
7 | },
8 | "ex:prop": "value2"
9 | }
--------------------------------------------------------------------------------
/tests/expand/st36-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "ex:prop": [{"@value": "value"}]
4 | },
5 | "ex:prop": [{"@value": "value2"}]
6 | }]
--------------------------------------------------------------------------------
/tests/expand/st37-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "metadata": "@annotation"
4 | },
5 | "@id": "ex:bob",
6 | "ex:age": {
7 | "@value": 23,
8 | "metadata": {"ex:certainty": 0.8}
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/expand/st37-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{
4 | "@value": 23,
5 | "@annotation": [{"ex:certainty": [{"@value": 0.8}]}]
6 | }]
7 | }]
--------------------------------------------------------------------------------
/tests/expand/st38-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@base": "http://example.org/",
4 | "@vocab": "http://example.org/",
5 | "claims": {"@type": "@id"}
6 | },
7 | "@id": {
8 | "@id": "bob",
9 | "knows": {"@id": "alice"}
10 | },
11 | "certainty": {
12 | "@value": 0.8,
13 | "@annotation": {"claims": "ted"}
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/expand/st38-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "http://example.org/bob",
4 | "http://example.org/knows": [{"@id": "http://example.org/alice"}]
5 | },
6 | "http://example.org/certainty": [{
7 | "@value": 0.8,
8 | "@annotation": [{
9 | "http://example.org/claims": [{"@id": "http://example.org/ted"}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/expand/st39-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "ex:",
4 | "p1": {"@type": "@id"}
5 | },
6 | "@id": "ex:s",
7 | "p": {
8 | "@id": "ex:o",
9 | "@annotation": {
10 | "r": {
11 | "@id": {"@id": "ex:s1", "p1": "ex:o1"}
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/expand/st39-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{
4 | "@id": "ex:o",
5 | "@annotation": [{
6 | "ex:r": [{
7 | "@id": {
8 | "@id": "ex:s1",
9 | "ex:p1": [{"@id": "ex:o1"}]
10 | }
11 | }]
12 | }]
13 | }]
14 | }]
15 |
--------------------------------------------------------------------------------
/tests/expand/st40-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "ex:",
4 | "p1": {"@type": "@id"}
5 | },
6 | "@id": "ex:s",
7 | "p": {
8 | "@id": "ex:o",
9 | "@annotation": {
10 | "r": {
11 | "@id": "ex:s1",
12 | "@annotation": {
13 | "p1": "ex:o1"
14 | }
15 | }
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/expand/st40-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{
4 | "@id": "ex:o",
5 | "@annotation": [{
6 | "ex:r": [{
7 | "@id": "ex:s1",
8 | "@annotation": [{
9 | "ex:p1": [{"@id": "ex:o1"}]
10 | }]
11 | }]
12 | }]
13 | }]
14 | }]
--------------------------------------------------------------------------------
/tests/flatten-manifest.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": ["context.jsonld", {"@base": "flatten-manifest"}],
3 | "@id": "",
4 | "@type": "mf:Manifest",
5 | "name": "Flattening",
6 | "description": "These tests implement the requirements for the JSON-LD-star [Flattening Algorithm](https://json-ld.github.io/json-ld-star#flattening-algorithm).",
7 | "baseIri": "https://w3c.github.io/json-ld-api/tests/",
8 | "sequence": [
9 | {
10 | "@id": "#tst02",
11 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
12 | "name": "ignored annotation 1",
13 | "purpose": "Node object with @annotation property is ignored without rdfstar option.",
14 | "input": "flatten/st02-in.jsonld",
15 | "expect": "flatten/st02-out.jsonld",
16 | "requires": "JSON-LD-star",
17 | "option": {"specVersion": "json-ld-star", "rdfstar": false}
18 | }, {
19 | "@id": "#tst03",
20 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
21 | "name": "ignored annotation 2",
22 | "purpose": "Value object with @annotation property is ignored without rdfstar option",
23 | "input": "flatten/st03-in.jsonld",
24 | "expect": "flatten/st03-out.jsonld",
25 | "requires": "JSON-LD-star",
26 | "option": {"specVersion": "json-ld-star", "rdfstar": false}
27 | }, {
28 | "@id": "#tst04",
29 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
30 | "name": "embedded node 1",
31 | "purpose": "Node with embedded subject having no @id",
32 | "input": "flatten/st04-in.jsonld",
33 | "expect": "flatten/st04-out.jsonld",
34 | "requires": "JSON-LD-star",
35 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
36 | }, {
37 | "@id": "#tst05",
38 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
39 | "name": "embedded node 2",
40 | "purpose": "Node with embedded subject having IRI @id",
41 | "input": "flatten/st05-in.jsonld",
42 | "expect": "flatten/st05-out.jsonld",
43 | "requires": "JSON-LD-star",
44 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
45 | }, {
46 | "@id": "#tst06",
47 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
48 | "name": "embedded node 3",
49 | "purpose": "Node with embedded subject having BNode @id",
50 | "input": "flatten/st06-in.jsonld",
51 | "expect": "flatten/st06-out.jsonld",
52 | "requires": "JSON-LD-star",
53 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
54 | }, {
55 | "@id": "#tst07",
56 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
57 | "name": "embedded node 4",
58 | "purpose": "Node with embedded subject having a type",
59 | "input": "flatten/st07-in.jsonld",
60 | "expect": "flatten/st07-out.jsonld",
61 | "requires": "JSON-LD-star",
62 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
63 | }, {
64 | "@id": "#tst08",
65 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
66 | "name": "embedded node 5",
67 | "purpose": "Node with embedded subject having an IRI value",
68 | "input": "flatten/st08-in.jsonld",
69 | "expect": "flatten/st08-out.jsonld",
70 | "requires": "JSON-LD-star",
71 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
72 | }, {
73 | "@id": "#tst09",
74 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
75 | "name": "embedded node 6",
76 | "purpose": "Node with embedded subject having an BNode value",
77 | "input": "flatten/st09-in.jsonld",
78 | "expect": "flatten/st09-out.jsonld",
79 | "requires": "JSON-LD-star",
80 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
81 | }, {
82 | "@id": "#tst10",
83 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
84 | "name": "embedded node 7",
85 | "purpose": "Node with recursive embedded subject",
86 | "input": "flatten/st10-in.jsonld",
87 | "expect": "flatten/st10-out.jsonld",
88 | "requires": "JSON-LD-star",
89 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
90 | }, {
91 | "@id": "#tst15",
92 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
93 | "name": "embedded node 8",
94 | "purpose": "Node with embedded object",
95 | "input": "flatten/st15-in.jsonld",
96 | "expect": "flatten/st15-out.jsonld",
97 | "requires": "JSON-LD-star",
98 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
99 | }, {
100 | "@id": "#tst16",
101 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
102 | "name": "embedded node 9",
103 | "purpose": "Node with embedded object having properties",
104 | "input": "flatten/st16-in.jsonld",
105 | "expect": "flatten/st16-out.jsonld",
106 | "requires": "JSON-LD-star",
107 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
108 | }, {
109 | "@id": "#tst17",
110 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
111 | "name": "embedded node 10",
112 | "purpose": "Node with recursive embedded object",
113 | "input": "flatten/st17-in.jsonld",
114 | "expect": "flatten/st17-out.jsonld",
115 | "requires": "JSON-LD-star",
116 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
117 | }, {
118 | "@id": "#tst18",
119 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
120 | "name": "Annotation node 1",
121 | "purpose": "Node with @annotation property on value object",
122 | "input": "flatten/st18-in.jsonld",
123 | "expect": "flatten/st18-out.jsonld",
124 | "requires": "JSON-LD-star",
125 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
126 | }, {
127 | "@id": "#tst18n",
128 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
129 | "name": "Annotation node 1 (with @annotation)",
130 | "purpose": "Node with @annotation property on value object",
131 | "input": "flatten/st18-in.jsonld",
132 | "expect": "flatten/st18n-out.jsonld",
133 | "requires": "JSON-LD-star",
134 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
135 | }, {
136 | "@id": "#tst19",
137 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
138 | "name": "Annotation node 2",
139 | "purpose": "Node with @annotation property on node object",
140 | "input": "flatten/st19-in.jsonld",
141 | "expect": "flatten/st19-out.jsonld",
142 | "requires": "JSON-LD-star",
143 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
144 | }, {
145 | "@id": "#tst19n",
146 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
147 | "name": "Annotation node 2 (with @annotation)",
148 | "purpose": "Node with @annotation property on node object",
149 | "input": "flatten/st19-in.jsonld",
150 | "expect": "flatten/st19n-out.jsonld",
151 | "requires": "JSON-LD-star",
152 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
153 | }, {
154 | "@id": "#tst20",
155 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
156 | "name": "Annotation node 3",
157 | "purpose": "Node with @annotation property multiple values",
158 | "input": "flatten/st20-in.jsonld",
159 | "expect": "flatten/st20-out.jsonld",
160 | "requires": "JSON-LD-star",
161 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
162 | }, {
163 | "@id": "#tst20n",
164 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
165 | "name": "Annotation node 3 (with @annotation)",
166 | "purpose": "Node with @annotation property multiple values",
167 | "input": "flatten/st20-in.jsonld",
168 | "expect": "flatten/st20n-out.jsonld",
169 | "requires": "JSON-LD-star",
170 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
171 | }, {
172 | "@id": "#tst20a",
173 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
174 | "name": "Annotation node 4",
175 | "purpose": "Node with @annotation property containing multiple properties",
176 | "input": "flatten/st20a-in.jsonld",
177 | "expect": "flatten/st20a-out.jsonld",
178 | "requires": "JSON-LD-star",
179 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
180 | }, {
181 | "@id": "#tst20an",
182 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
183 | "name": "Annotation node 4 (with @annotation)",
184 | "purpose": "Node with @annotation property containing multiple properties",
185 | "input": "flatten/st20a-in.jsonld",
186 | "expect": "flatten/st20an-out.jsonld",
187 | "requires": "JSON-LD-star",
188 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
189 | }, {
190 | "@id": "#tst20b",
191 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
192 | "name": "Annotation node 5",
193 | "purpose": "Node with @annotation property containing an empty node object",
194 | "input": "flatten/st20b-in.jsonld",
195 | "expect": "flatten/st20b-out.jsonld",
196 | "requires": "JSON-LD-star",
197 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
198 | }, {
199 | "@id": "#tst20bn",
200 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
201 | "name": "Annotation node 5 (with @annotation)",
202 | "purpose": "Node with @annotation property containing an empty node object",
203 | "input": "flatten/st20b-in.jsonld",
204 | "expect": "flatten/st20b-out.jsonld",
205 | "requires": "JSON-LD-star",
206 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
207 | }, {
208 | "@id": "#tst28",
209 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
210 | "name": "Embedded annotation node 1",
211 | "purpose": "Node with @annotation property on embedded subject",
212 | "input": "flatten/st28-in.jsonld",
213 | "expect": "flatten/st28-out.jsonld",
214 | "requires": "JSON-LD-star",
215 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
216 | }, {
217 | "@id": "#tst28n",
218 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
219 | "name": "Embedded annotation node 1 (with @annotation)",
220 | "purpose": "Node with @annotation property on embedded subject",
221 | "input": "flatten/st28-in.jsonld",
222 | "expect": "flatten/st28n-out.jsonld",
223 | "requires": "JSON-LD-star",
224 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
225 | }, {
226 | "@id": "#tst29",
227 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
228 | "name": "Embedded annotation node 2",
229 | "purpose": "Node with @annotation property on embedded object",
230 | "input": "flatten/st29-in.jsonld",
231 | "expect": "flatten/st29-out.jsonld",
232 | "requires": "JSON-LD-star",
233 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
234 | }, {
235 | "@id": "#tst29n",
236 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
237 | "name": "Embedded annotation node 2 (with @annotation)",
238 | "purpose": "Node with @annotation property on embedded object",
239 | "input": "flatten/st29-in.jsonld",
240 | "expect": "flatten/st29n-out.jsonld",
241 | "requires": "JSON-LD-star",
242 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
243 | }, {
244 | "@id": "#tst32",
245 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
246 | "name": "embedded node 13",
247 | "purpose": "Embedded node used as subject in reverse relationship",
248 | "input": "flatten/st32-in.jsonld",
249 | "expect": "flatten/st32-out.jsonld",
250 | "requires": "JSON-LD-star",
251 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
252 | }, {
253 | "@id": "#tst33",
254 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
255 | "name": "embedded node 14",
256 | "purpose": "Embedded node used as object in reverse relationship",
257 | "input": "flatten/st33-in.jsonld",
258 | "expect": "flatten/st33-out.jsonld",
259 | "requires": "JSON-LD-star",
260 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
261 | }, {
262 | "@id": "#tst34",
263 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
264 | "name": "Reverse annotation node 1",
265 | "purpose": "node with @annotation property on node object with reverse relationship",
266 | "input": "flatten/st34-in.jsonld",
267 | "expect": "flatten/st34-out.jsonld",
268 | "requires": "JSON-LD-star",
269 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
270 | }, {
271 | "@id": "#tst34n",
272 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
273 | "name": "Reverse annotation node 1 (with @annotation)",
274 | "purpose": "node with @annotation property on node object with reverse relationship",
275 | "input": "flatten/st34-in.jsonld",
276 | "expect": "flatten/st34n-out.jsonld",
277 | "requires": "JSON-LD-star",
278 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
279 | }, {
280 | "@id": "#tst35",
281 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
282 | "name": "Reverse annotation node 2",
283 | "purpose": "reverse relationship inside annotation",
284 | "input": "flatten/st35-in.jsonld",
285 | "expect": "flatten/st35-out.jsonld",
286 | "requires": "JSON-LD-star",
287 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
288 | }, {
289 | "@id": "#tst35n",
290 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
291 | "name": "Reverse annotation node 2 (with @annotation)",
292 | "purpose": "reverse relationship inside annotation",
293 | "input": "flatten/st35-in.jsonld",
294 | "expect": "flatten/st35n-out.jsonld",
295 | "requires": "JSON-LD-star",
296 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
297 | }, {
298 | "@id": "#tst36",
299 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
300 | "name": "Alias for embedded node",
301 | "purpose": "embedded node with an alias of `@id`",
302 | "input": "flatten/st36-in.jsonld",
303 | "expect": "flatten/st36-out.jsonld",
304 | "requires": "JSON-LD-star",
305 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
306 | }, {
307 | "@id": "#tst37",
308 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
309 | "name": "Alias for annotation node",
310 | "purpose": "annotation node with an alias of `@annotation`",
311 | "input": "flatten/st37-in.jsonld",
312 | "expect": "flatten/st37-out.jsonld",
313 | "requires": "JSON-LD-star",
314 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
315 | }, {
316 | "@id": "#tst38",
317 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
318 | "name": "annotation value 1",
319 | "purpose": "embedded node with annotation on value object",
320 | "input": "flatten/st38-in.jsonld",
321 | "expect": "flatten/st38-out.jsonld",
322 | "requires": "JSON-LD-star",
323 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
324 | }, {
325 | "@id": "#tst38n",
326 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
327 | "name": "annotation value 1 (with @annotation)",
328 | "purpose": "embedded node with annotation on value object",
329 | "input": "flatten/st38-in.jsonld",
330 | "expect": "flatten/st38n-out.jsonld",
331 | "requires": "JSON-LD-star",
332 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
333 | }, {
334 | "@id": "#tst39",
335 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
336 | "name": "annotation with embedded node 1",
337 | "purpose": "annotation node containing an embedded node",
338 | "input": "flatten/st39-in.jsonld",
339 | "expect": "flatten/st39-out.jsonld",
340 | "requires": "JSON-LD-star",
341 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
342 | }, {
343 | "@id": "#tst39n",
344 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
345 | "name": "annotation with embedded node 1 (with @annotation)",
346 | "purpose": "annotation node containing an embedded node",
347 | "input": "flatten/st39-in.jsonld",
348 | "expect": "flatten/st39n-out.jsonld",
349 | "requires": "JSON-LD-star",
350 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
351 | }, {
352 | "@id": "#tst40",
353 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
354 | "name": "annotation with annotation 1",
355 | "purpose": "annotation node containing an annotation node",
356 | "input": "flatten/st40-in.jsonld",
357 | "expect": "flatten/st40-out.jsonld",
358 | "requires": "JSON-LD-star",
359 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
360 | }, {
361 | "@id": "#tst40n",
362 | "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
363 | "name": "annotation with annotation 1 (with @annotation)",
364 | "purpose": "annotation node containing an annotation node",
365 | "input": "flatten/st40-in.jsonld",
366 | "expect": "flatten/st40n-out.jsonld",
367 | "requires": "JSON-LD-star",
368 | "option": {"specVersion": "json-ld-star", "rdfstar": true, "createAnnotations": true}
369 | }
370 | ]
371 | }
372 |
--------------------------------------------------------------------------------
/tests/flatten/st02-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:knows": {
4 | "@id": "ex:fred",
5 | "@annotation": {
6 | "ex:certainty": 0.8
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/flatten/st02-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:knows": [{"@id": "ex:fred"}]
4 | }]
--------------------------------------------------------------------------------
/tests/flatten/st03-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:age": {
4 | "@value": 23,
5 | "@annotation": {
6 | "ex:certainty": 0.8
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/flatten/st03-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{"@value": 23}]
4 | }]
--------------------------------------------------------------------------------
/tests/flatten/st04-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "ex:prop": "value"
4 | },
5 | "ex:prop": "value2"
6 | }
--------------------------------------------------------------------------------
/tests/flatten/st04-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "ex:prop": [{"@value": "value"}]
4 | },
5 | "ex:prop": [{"@value": "value2"}]
6 | }]
--------------------------------------------------------------------------------
/tests/flatten/st05-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/flatten/st05-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/flatten/st06-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "_:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/flatten/st06-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "_:b0",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/flatten/st07-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": "ex:Type"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/flatten/st07-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": ["ex:Type"]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/flatten/st08-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "ex:value"}
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/flatten/st08-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "ex:value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/flatten/st09-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "_:value"}
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/flatten/st09-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:b0"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/flatten/st10-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": {
4 | "@id": "ex:rei",
5 | "ex:prop": "value3"
6 | },
7 | "ex:prop": "value"
8 | },
9 | "ex:prop": "value2"
10 | }
--------------------------------------------------------------------------------
/tests/flatten/st10-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": {
4 | "@id": "ex:rei",
5 | "ex:prop": [{"@value": "value3"}]
6 | },
7 | "ex:prop": [{"@value": "value"}]
8 | },
9 | "ex:prop": [{"@value": "value2"}]
10 | }]
--------------------------------------------------------------------------------
/tests/flatten/st15-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/flatten/st15-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | }
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/flatten/st16-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | },
8 | "ex:prop": "value2"
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/flatten/st16-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | }
8 | }]
9 | }, {
10 | "@id": {
11 | "@id": "ex:rei",
12 | "ex:prop": [{"@value": "value"}]
13 | },
14 | "ex:prop": [{"@value": "value2"}]
15 | }]
--------------------------------------------------------------------------------
/tests/flatten/st17-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": "value3"
8 | },
9 | "ex:prop": "value"
10 | },
11 | "ex:prop": "value2"
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/flatten/st17-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": [{"@value": "value3"}]
8 | },
9 | "ex:prop":[{"@value": "value"}]
10 | }
11 | }]
12 | }, {
13 | "@id": {
14 | "@id": {
15 | "@id": "ex:rei",
16 | "ex:prop": [{"@value": "value3"}]
17 | },
18 | "ex:prop":[{"@value": "value"}]
19 | },
20 | "ex:prop": [{"@value": "value2"}]
21 | }]
--------------------------------------------------------------------------------
/tests/flatten/st18-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:age": {
4 | "@value": 23,
5 | "@annotation": {"ex:certainty": 0.8}
6 | }
7 | }
--------------------------------------------------------------------------------
/tests/flatten/st18-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{"@value": 23}]
4 | }, {
5 | "@id": {
6 | "@id": "ex:bob",
7 | "ex:age": [{"@value": 23}]
8 | },
9 | "ex:certainty": [{"@value": 0.8}]
10 | }]
--------------------------------------------------------------------------------
/tests/flatten/st18n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{
4 | "@value": 23,
5 | "@annotation": [{
6 | "ex:certainty": [{"@value": 0.8}]
7 | }]
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/flatten/st19-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "ex:knows": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": {"ex:certainty": 0.8}
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/flatten/st19-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{"@id": "ex:fred"}]
5 | }, {
6 | "@id": "ex:fred",
7 | "ex:name": [{"@value": "Fred"}]
8 | }, {
9 | "@id": {
10 | "@id": "ex:bob",
11 | "ex:knows": [{"@id": "ex:fred"}]
12 | },
13 | "ex:certainty": [{"@value": 0.8}]
14 | }]
--------------------------------------------------------------------------------
/tests/flatten/st19n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "@annotation": [{
7 | "ex:certainty": [{"@value": 0.8}]
8 | }]
9 | }]
10 | }, {
11 | "@id": "ex:fred",
12 | "ex:name": [{"@value": "Fred"}]
13 | }]
--------------------------------------------------------------------------------
/tests/flatten/st20-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "ex:knows": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": [{
8 | "ex:certainty": 0.8
9 | }, {
10 | "ex:source": {"@id": "http://example.org/"}
11 | }]
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/flatten/st20-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{"@id": "ex:fred"}]
5 | }, {
6 | "@id": "ex:fred",
7 | "ex:name": [{"@value": "Fred"}]
8 | }, {
9 | "@id": {
10 | "@id": "ex:bob",
11 | "ex:knows": [{"@id": "ex:fred"}]
12 | },
13 | "ex:certainty": [{"@value": 0.8}],
14 | "ex:source": [{"@id": "http://example.org/"}]
15 | }]
--------------------------------------------------------------------------------
/tests/flatten/st20a-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "ex:knows": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": [{
8 | "ex:certainty": 0.8,
9 | "ex:source": {"@id": "http://example.org/"}
10 | }]
11 | }
12 | }
--------------------------------------------------------------------------------
/tests/flatten/st20a-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{"@id": "ex:fred"}]
5 | },
6 | {
7 | "@id": "ex:fred",
8 | "ex:name": [{"@value": "Fred"}]
9 | },
10 | {
11 | "@id": {
12 | "@id": "ex:bob",
13 | "ex:knows": [{"@id": "ex:fred"}]
14 | },
15 | "ex:certainty": [{"@value": 0.8}],
16 | "ex:source": [{"@id": "http://example.org/"}]
17 | }]
18 |
--------------------------------------------------------------------------------
/tests/flatten/st20an-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "@annotation": [{
7 | "ex:certainty": [{"@value": 0.8}],
8 | "ex:source": [{"@id": "http://example.org/"}]
9 | }]
10 | }]
11 | }, {
12 | "@id": "ex:fred",
13 | "ex:name": [{"@value": "Fred"}]
14 | }]
15 |
--------------------------------------------------------------------------------
/tests/flatten/st20b-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:name": "Bob",
4 | "ex:knows": {
5 | "@id": "ex:fred",
6 | "ex:name": "Fred",
7 | "@annotation": {}
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/flatten/st20b-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{"@id": "ex:fred"}]
5 | },
6 | {
7 | "@id": "ex:fred",
8 | "ex:name": [{"@value": "Fred"}]
9 | }]
--------------------------------------------------------------------------------
/tests/flatten/st20n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "@annotation": [{
7 | "ex:certainty": [{"@value": 0.8}],
8 | "ex:source": [{"@id": "http://example.org/"}]
9 | }]
10 | }]
11 | }, {
12 | "@id": "ex:fred",
13 | "ex:name": [{"@value": "Fred"}]
14 | }]
--------------------------------------------------------------------------------
/tests/flatten/st28-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "_:value"}
5 | },
6 | "ex:prop": {
7 | "@value": "value2",
8 | "@annotation": {"ex:certainty": 0.8}
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/flatten/st28-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:b0"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }, {
8 | "@id": {
9 | "@id": {
10 | "@id": "ex:rei",
11 | "ex:prop": [{"@id": "_:b0"}]
12 | },
13 | "ex:prop": [{"@value": "value2"}]
14 | },
15 | "ex:certainty": [{"@value": 0.8}]
16 | }]
--------------------------------------------------------------------------------
/tests/flatten/st28n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:b0"}]
5 | },
6 | "ex:prop": [{
7 | "@value": "value2",
8 | "@annotation": [{
9 | "ex:certainty": [{"@value": 0.8}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/flatten/st29-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | },
8 | "@annotation": {"ex:certainty": 0.8}
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/flatten/st29-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | }
8 | }]
9 | }, {
10 | "@id": {
11 | "@id": "ex:subj",
12 | "ex:value": [{
13 | "@id": {
14 | "@id": "ex:rei",
15 | "ex:prop": [{"@value": "value"}]
16 | }
17 | }]
18 | },
19 | "ex:certainty": [{"@value": 0.8}]
20 | }]
--------------------------------------------------------------------------------
/tests/flatten/st29n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | },
8 | "@annotation": [{
9 | "ex:certainty": [{"@value": 0.8}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/flatten/st32-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "rel": {"@reverse": "ex:rel"}
4 | },
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": {"@id": "ex:value"}
8 | },
9 | "rel": {"@id": "ex:value2"}
10 | }
--------------------------------------------------------------------------------
/tests/flatten/st32-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:value2",
3 | "ex:rel": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@id": "ex:value"}]
7 | }
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/flatten/st33-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "rel": {"@reverse": "ex:rel"}
4 | },
5 | "@id": "ex:subj",
6 | "rel": {
7 | "@id": {
8 | "@id": "ex:rei",
9 | "ex:prop": {"@id": "ex:value"}
10 | },
11 | "ex:prop": {"@id": "ex:value2"}
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/flatten/st33-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "ex:value"}]
5 | },
6 | "ex:rel": [{"@id": "ex:subj"}],
7 | "ex:prop": [{"@id": "ex:value2"}]
8 | }]
--------------------------------------------------------------------------------
/tests/flatten/st34-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "knownBy": {"@reverse": "ex:knows"}
4 | },
5 | "@id": "ex:bob",
6 | "ex:name": "Bob",
7 | "knownBy": {
8 | "@id": "ex:fred",
9 | "ex:name": "Fred",
10 | "@annotation": {"ex:certainty": 0.8}
11 | }
12 | }
--------------------------------------------------------------------------------
/tests/flatten/st34-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}]
4 | }, {
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "ex:knows": [{"@id": "ex:bob"}]
8 | }, {
9 | "@id": {
10 | "@id": "ex:fred",
11 | "ex:knows": [{"@id": "ex:bob"}]
12 | },
13 | "ex:certainty": [{"@value": 0.8}]
14 | }]
--------------------------------------------------------------------------------
/tests/flatten/st34n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}]
4 | }, {
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "ex:knows": [{
8 | "@id": "ex:bob",
9 | "@annotation": [{
10 | "ex:certainty": [{"@value": 0.8}]
11 | }]
12 | }]
13 | }]
--------------------------------------------------------------------------------
/tests/flatten/st35-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "claims": {"@reverse": "ex:claims", "@type": "@id"}
4 | },
5 | "@id": "ex:bob",
6 | "ex:knows": {
7 | "@id": "ex:jane",
8 | "@annotation": {
9 | "ex:certainty": 0.8,
10 | "claims": "ex:sue"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/flatten/st35-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:knows": [{"@id": "ex:jane"}]
4 | }, {
5 | "@id": {
6 | "@id": "ex:bob",
7 | "ex:knows": [{"@id": "ex:jane"}]
8 | },
9 | "ex:certainty": [{"@value": 0.8}]
10 | }, {
11 | "@id": "ex:sue",
12 | "ex:claims": [{
13 | "@id": {
14 | "@id": "ex:bob",
15 | "ex:knows": [{"@id": "ex:jane"}]
16 | }
17 | }]
18 | }]
--------------------------------------------------------------------------------
/tests/flatten/st35n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:knows": [{
4 | "@id": "ex:jane",
5 | "@annotation": [{
6 | "ex:certainty": [{"@value": 0.8}]
7 | }]
8 | }]
9 | },{
10 | "@id": "ex:sue",
11 | "ex:claims": [{
12 | "@id": {
13 | "@id": "ex:bob",
14 | "ex:knows": [{"@id": "ex:jane"}]
15 | }
16 | }]
17 | }]
18 |
--------------------------------------------------------------------------------
/tests/flatten/st36-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "triple": "@id"
4 | },
5 | "triple": {
6 | "ex:prop": "value"
7 | },
8 | "ex:prop": "value2"
9 | }
--------------------------------------------------------------------------------
/tests/flatten/st36-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "ex:prop": [{"@value": "value"}]
4 | },
5 | "ex:prop": [{"@value": "value2"}]
6 | }]
--------------------------------------------------------------------------------
/tests/flatten/st37-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "metadata": "@annotation"
4 | },
5 | "@id": "ex:bob",
6 | "ex:age": {
7 | "@value": 23,
8 | "metadata": {"ex:certainty": 0.8}
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/flatten/st37-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{"@value": 23}]
4 | },
5 | {
6 | "@id": {
7 | "@id": "ex:bob",
8 | "ex:age": [{"@value": 23}]
9 | },
10 | "ex:certainty": [{"@value": 0.8}]
11 | }]
--------------------------------------------------------------------------------
/tests/flatten/st38-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@base": "http://example.org/",
4 | "@vocab": "http://example.org/",
5 | "claims": {"@type": "@id"}
6 | },
7 | "@id": {
8 | "@id": "bob",
9 | "knows": {"@id": "alice"}
10 | },
11 | "certainty": {
12 | "@value": 0.8,
13 | "@annotation": {"claims": "ted"}
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/flatten/st38-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "http://example.org/bob",
4 | "http://example.org/knows": [{"@id": "http://example.org/alice"}]
5 | },
6 | "http://example.org/certainty": [{"@value": 0.8}]
7 | }, {
8 | "@id": {
9 | "@id": {
10 | "@id": "http://example.org/bob",
11 | "http://example.org/knows": [{"@id": "http://example.org/alice"}]
12 | },
13 | "http://example.org/certainty": [{"@value": 0.8}]
14 | },
15 | "http://example.org/claims": [{"@id": "http://example.org/ted"}]
16 | }]
--------------------------------------------------------------------------------
/tests/flatten/st38n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "http://example.org/bob",
4 | "http://example.org/knows": [{"@id": "http://example.org/alice"}]
5 | },
6 | "http://example.org/certainty": [{
7 | "@value": 0.8,
8 | "@annotation": [{
9 | "http://example.org/claims": [{"@id": "http://example.org/ted"}]
10 | }]
11 | }]
12 | }]
--------------------------------------------------------------------------------
/tests/flatten/st39-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "ex:",
4 | "p1": {"@type": "@id"}
5 | },
6 | "@id": "ex:s",
7 | "p": {
8 | "@id": "ex:o",
9 | "@annotation": {
10 | "r": {
11 | "@id": {"@id": "ex:s1", "p1": "ex:o1"}
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/flatten/st39-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{"@id": "ex:o"}]
4 | }, {
5 | "@id": {
6 | "@id": "ex:s",
7 | "ex:p": [{"@id": "ex:o"}]
8 | },
9 | "ex:r": [{
10 | "@id": {
11 | "@id": "ex:s1",
12 | "ex:p1": [{"@id": "ex:o1"}]
13 | }
14 | }]
15 | }]
16 |
--------------------------------------------------------------------------------
/tests/flatten/st39n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{
4 | "@id": "ex:o",
5 | "@annotation": [{
6 | "ex:r": [{
7 | "@id": {
8 | "@id": "ex:s1",
9 | "ex:p1": [{"@id": "ex:o1"}]
10 | }
11 | }]
12 | }]
13 | }]
14 | }]
15 |
--------------------------------------------------------------------------------
/tests/flatten/st40-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "ex:",
4 | "p1": {"@type": "@id"}
5 | },
6 | "@id": "ex:s",
7 | "p": {
8 | "@id": "ex:o",
9 | "@annotation": {
10 | "r": {
11 | "@id": "ex:s1",
12 | "@annotation": {
13 | "p1": "ex:o1"
14 | }
15 | }
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/flatten/st40-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{"@id": "ex:o"}]
4 | }, {
5 | "@id": {
6 | "@id": "ex:s",
7 | "ex:p": [{"@id": "ex:o"}]
8 | },
9 | "ex:r": [{"@id": "ex:s1"}]
10 | }, {
11 | "@id": {
12 | "@id": {
13 | "@id": "ex:s",
14 | "ex:p": [{"@id": "ex:o"}]
15 | },
16 | "ex:r": [{"@id": "ex:s1"}]
17 | },
18 | "ex:p1": [{"@id": "ex:o1"}]
19 | }]
20 |
--------------------------------------------------------------------------------
/tests/flatten/st40n-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{
4 | "@id": "ex:o",
5 | "@annotation": [{
6 | "ex:r": [{
7 | "@id": "ex:s1",
8 | "@annotation": [{
9 | "ex:p1": [{"@id": "ex:o1"}]
10 | }]
11 | }]
12 | }]
13 | }]
14 | }]
15 |
--------------------------------------------------------------------------------
/tests/fromRdf-manifest.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": ["context.jsonld", {"@base": "fromRdf-manifest"}],
3 | "@id": "",
4 | "@type": "mf:Manifest",
5 | "name": "Transform RDF to JSON-LD",
6 | "description": "These tests implement the requirements for the JSON-LD-star [Serialize RDF as JSON-LD Algorithm](https://json-ld.github.io/json-ld-star#serialize-rdf-as-json-ld-algorithm).",
7 | "baseIri": "https://w3c.github.io/json-ld-api/tests/",
8 | "sequence": [
9 | {
10 | "@id": "#tst02",
11 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
12 | "name": "ignored annotation 1",
13 | "purpose": "Node object with @annotation property is ignored without rdfstar option.",
14 | "input": "fromRdf/st02-in.nq",
15 | "expect": "fromRdf/st02-out.jsonld",
16 | "requires": "JSON-LD-star",
17 | "option": {"specVersion": "json-ld-star", "rdfstar": false}
18 | }, {
19 | "@id": "#tst03",
20 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
21 | "name": "ignored annotation 2",
22 | "purpose": "Value object with @annotation property is ignored without rdfstar option",
23 | "input": "fromRdf/st03-in.nq",
24 | "expect": "fromRdf/st03-out.jsonld",
25 | "requires": "JSON-LD-star",
26 | "option": {"specVersion": "json-ld-star", "rdfstar": false}
27 | }, {
28 | "@id": "#tst04",
29 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
30 | "name": "embedded node 1",
31 | "purpose": "Node with embedded subject having no @id",
32 | "input": "fromRdf/st04-in.nq",
33 | "expect": "fromRdf/st04-out.jsonld",
34 | "requires": "JSON-LD-star",
35 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
36 | }, {
37 | "@id": "#tst05",
38 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
39 | "name": "embedded node 2",
40 | "purpose": "Node with embedded subject having IRI @id",
41 | "input": "fromRdf/st05-in.nq",
42 | "expect": "fromRdf/st05-out.jsonld",
43 | "requires": "JSON-LD-star",
44 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
45 | }, {
46 | "@id": "#tst06",
47 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
48 | "name": "embedded node 3",
49 | "purpose": "Node with embedded subject having BNode @id",
50 | "input": "fromRdf/st06-in.nq",
51 | "expect": "fromRdf/st06-out.jsonld",
52 | "requires": "JSON-LD-star",
53 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
54 | }, {
55 | "@id": "#tst07",
56 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
57 | "name": "embedded node 4",
58 | "purpose": "Node with embedded subject having a type",
59 | "input": "fromRdf/st07-in.nq",
60 | "expect": "fromRdf/st07-out.jsonld",
61 | "requires": "JSON-LD-star",
62 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
63 | }, {
64 | "@id": "#tst08",
65 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
66 | "name": "embedded node 5",
67 | "purpose": "Node with embedded subject having an IRI value",
68 | "input": "fromRdf/st08-in.nq",
69 | "expect": "fromRdf/st08-out.jsonld",
70 | "requires": "JSON-LD-star",
71 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
72 | }, {
73 | "@id": "#tst09",
74 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
75 | "name": "embedded node 6",
76 | "purpose": "Node with embedded subject having an BNode value",
77 | "input": "fromRdf/st09-in.nq",
78 | "expect": "fromRdf/st09-out.jsonld",
79 | "requires": "JSON-LD-star",
80 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
81 | }, {
82 | "@id": "#tst10",
83 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
84 | "name": "embedded node 7",
85 | "purpose": "Node with recursive embedded subject",
86 | "input": "fromRdf/st10-in.nq",
87 | "expect": "fromRdf/st10-out.jsonld",
88 | "requires": "JSON-LD-star",
89 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
90 | }, {
91 | "@id": "#tst15",
92 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
93 | "name": "embedded node 8",
94 | "purpose": "Node with embedded object",
95 | "input": "fromRdf/st15-in.nq",
96 | "expect": "fromRdf/st15-out.jsonld",
97 | "requires": "JSON-LD-star",
98 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
99 | }, {
100 | "@id": "#tst16",
101 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
102 | "name": "embedded node 9",
103 | "purpose": "Node with embedded object having properties",
104 | "input": "fromRdf/st16-in.nq",
105 | "expect": "fromRdf/st16-out.jsonld",
106 | "requires": "JSON-LD-star",
107 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
108 | }, {
109 | "@id": "#tst17",
110 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
111 | "name": "embedded node 10",
112 | "purpose": "Node with recursive embedded object",
113 | "input": "fromRdf/st17-in.nq",
114 | "expect": "fromRdf/st17-out.jsonld",
115 | "requires": "JSON-LD-star",
116 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
117 | }, {
118 | "@id": "#tst18",
119 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
120 | "name": "Annotation node 1",
121 | "purpose": "Node with @annotation property on value object",
122 | "input": "fromRdf/st18-in.nq",
123 | "expect": "fromRdf/st18-out.jsonld",
124 | "requires": "JSON-LD-star",
125 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
126 | }, {
127 | "@id": "#tst19",
128 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
129 | "name": "Annotation node 2",
130 | "purpose": "Node with @annotation property on node object",
131 | "input": "fromRdf/st19-in.nq",
132 | "expect": "fromRdf/st19-out.jsonld",
133 | "requires": "JSON-LD-star",
134 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
135 | }, {
136 | "@id": "#tst20",
137 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
138 | "name": "Annotation node 3",
139 | "purpose": "Node with @annotation property multiple values",
140 | "input": "fromRdf/st20-in.nq",
141 | "expect": "fromRdf/st20-out.jsonld",
142 | "requires": "JSON-LD-star",
143 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
144 | }, {
145 | "@id": "#tst20a",
146 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
147 | "name": "Annotation node 4",
148 | "purpose": "Node with @annotation property containing multiple properties",
149 | "input": "fromRdf/st20a-in.nq",
150 | "expect": "fromRdf/st20a-out.jsonld",
151 | "requires": "JSON-LD-star",
152 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
153 | }, {
154 | "@id": "#tst20b",
155 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
156 | "name": "Annotation node 5",
157 | "purpose": "Node with @annotation property containing an empty node object",
158 | "input": "fromRdf/st20b-in.nq",
159 | "expect": "fromRdf/st20b-out.jsonld",
160 | "requires": "JSON-LD-star",
161 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
162 | }, {
163 | "@id": "#tst28",
164 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
165 | "name": "Embedded annotation node 1",
166 | "purpose": "Node with @annotation property on embedded subject",
167 | "input": "fromRdf/st28-in.nq",
168 | "expect": "fromRdf/st28-out.jsonld",
169 | "requires": "JSON-LD-star",
170 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
171 | }, {
172 | "@id": "#tst29",
173 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
174 | "name": "Embedded annotation node 1",
175 | "purpose": "Node with @annotation property on embedded object",
176 | "input": "fromRdf/st29-in.nq",
177 | "expect": "fromRdf/st29-out.jsonld",
178 | "requires": "JSON-LD-star",
179 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
180 | }, {
181 | "@id": "#tst32",
182 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
183 | "name": "embedded node 13",
184 | "purpose": "Embedded node used as subject in reverse relationship",
185 | "input": "fromRdf/st32-in.nq",
186 | "expect": "fromRdf/st32-out.jsonld",
187 | "requires": "JSON-LD-star",
188 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
189 | }, {
190 | "@id": "#tst33",
191 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
192 | "name": "embedded node 14",
193 | "purpose": "Embedded node used as object in reverse relationship",
194 | "input": "fromRdf/st33-in.nq",
195 | "expect": "fromRdf/st33-out.jsonld",
196 | "requires": "JSON-LD-star",
197 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
198 | }, {
199 | "@id": "#tst34",
200 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
201 | "name": "Reverse annotation node 1",
202 | "purpose": "node with @annotation property on node object with reverse relationship",
203 | "input": "fromRdf/st34-in.nq",
204 | "expect": "fromRdf/st34-out.jsonld",
205 | "requires": "JSON-LD-star",
206 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
207 | }, {
208 | "@id": "#tst35",
209 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
210 | "name": "Reverse annotation node 2",
211 | "purpose": "reverse relationship inside annotation",
212 | "input": "fromRdf/st35-in.nq",
213 | "expect": "fromRdf/st35-out.jsonld",
214 | "requires": "JSON-LD-star",
215 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
216 | }, {
217 | "@id": "#tst36",
218 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
219 | "name": "Alias for embedded node",
220 | "purpose": "embedded node with an alias of `@id`",
221 | "input": "fromRdf/st36-in.nq",
222 | "expect": "fromRdf/st36-out.jsonld",
223 | "requires": "JSON-LD-star",
224 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
225 | }, {
226 | "@id": "#tst37",
227 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
228 | "name": "Alias for annotation node",
229 | "purpose": "annotation node with an alias of `@annotation`",
230 | "input": "fromRdf/st37-in.nq",
231 | "expect": "fromRdf/st37-out.jsonld",
232 | "requires": "JSON-LD-star",
233 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
234 | }, {
235 | "@id": "#tst38",
236 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
237 | "name": "annotation value 1",
238 | "purpose": "embedded node with annotation on value object",
239 | "input": "fromRdf/st38-in.nq",
240 | "expect": "fromRdf/st38-out.jsonld",
241 | "requires": "JSON-LD-star",
242 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
243 | }, {
244 | "@id": "#tst39",
245 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
246 | "name": "annotation with embedded node 1",
247 | "purpose": "annotation node containing an embedded node",
248 | "input": "fromRdf/st39-in.nq",
249 | "expect": "fromRdf/st39-out.jsonld",
250 | "requires": "JSON-LD-star",
251 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
252 | }, {
253 | "@id": "#tst40",
254 | "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
255 | "name": "annotation with annotation 1",
256 | "purpose": "annotation node containing an annotation node",
257 | "input": "fromRdf/st40-in.nq",
258 | "expect": "fromRdf/st40-out.jsonld",
259 | "requires": "JSON-LD-star",
260 | "option": {"specVersion": "json-ld-star", "rdfstar": true}
261 | }
262 | ]
263 | }
264 |
--------------------------------------------------------------------------------
/tests/fromRdf/st02-in.nq:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st02-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:knows": [{
4 | "@id": "ex:fred"
5 | }]
6 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st03-in.nq:
--------------------------------------------------------------------------------
1 | "23"^^ .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st03-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{
4 | "@value": "23",
5 | "@type": "http://www.w3.org/2001/XMLSchema#integer"
6 | }]
7 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st04-in.nq:
--------------------------------------------------------------------------------
1 | <<_:b0 "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st04-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "_:b0",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st05-in.nq:
--------------------------------------------------------------------------------
1 | << "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st05-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
8 |
--------------------------------------------------------------------------------
/tests/fromRdf/st06-in.nq:
--------------------------------------------------------------------------------
1 | <<_:rei "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st06-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "_:rei",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
8 |
--------------------------------------------------------------------------------
/tests/fromRdf/st07-in.nq:
--------------------------------------------------------------------------------
1 | << >> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st07-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": "ex:Type"
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
8 |
--------------------------------------------------------------------------------
/tests/fromRdf/st08-in.nq:
--------------------------------------------------------------------------------
1 | << >> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st08-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "ex:value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
8 |
--------------------------------------------------------------------------------
/tests/fromRdf/st09-in.nq:
--------------------------------------------------------------------------------
1 | << _:value>> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st09-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
8 |
--------------------------------------------------------------------------------
/tests/fromRdf/st10-in.nq:
--------------------------------------------------------------------------------
1 | <<<< "value3">> "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st10-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": {
4 | "@id": "ex:rei",
5 | "ex:prop": [{"@value": "value3"}]
6 | },
7 | "ex:prop": [{"@value": "value"}]
8 | },
9 | "ex:prop": [{"@value": "value2"}]
10 | }]
11 |
--------------------------------------------------------------------------------
/tests/fromRdf/st15-in.nq:
--------------------------------------------------------------------------------
1 | << "value">> .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st15-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | }
8 | }]
9 | }]
10 |
--------------------------------------------------------------------------------
/tests/fromRdf/st16-in.nq:
--------------------------------------------------------------------------------
1 | << "value">> .
2 | << "value">> "value2" .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st16-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | }
8 | }]
9 | }, {
10 | "@id": {
11 | "@id": "ex:rei",
12 | "ex:prop": [{"@value": "value"}]
13 | },
14 | "ex:prop": [{"@value": "value2"}]
15 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st17-in.nq:
--------------------------------------------------------------------------------
1 | <<<< "value3">> "value">> "value2" .
2 | <<<< "value3">> "value">> .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st17-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": {
6 | "@id": "ex:rei",
7 | "ex:prop": [{"@value": "value3"}]
8 | },
9 | "ex:prop":[{"@value": "value"}]
10 | }
11 | }]
12 | }, {
13 | "@id": {
14 | "@id": {
15 | "@id": "ex:rei",
16 | "ex:prop": [{"@value": "value3"}]
17 | },
18 | "ex:prop":[{"@value": "value"}]
19 | },
20 | "ex:prop": [{"@value": "value2"}]
21 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st18-in.nq:
--------------------------------------------------------------------------------
1 | "23"^^ .
2 | << "23"^^>> "8.0E-1"^^ .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st18-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{
4 | "@value": "23",
5 | "@type": "http://www.w3.org/2001/XMLSchema#integer",
6 | "@annotation": [{
7 | "ex:certainty": [{
8 | "@value": "8.0E-1",
9 | "@type": "http://www.w3.org/2001/XMLSchema#double"
10 | }]
11 | }]
12 | }]
13 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st19-in.nq:
--------------------------------------------------------------------------------
1 | "Fred" .
2 | << >> "8.0E-1"^^ .
3 | .
4 | "Bob" .
5 |
--------------------------------------------------------------------------------
/tests/fromRdf/st19-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "@annotation": [{
7 | "ex:certainty": [{
8 | "@value": "8.0E-1",
9 | "@type": "http://www.w3.org/2001/XMLSchema#double"
10 | }]
11 | }]
12 | }]
13 | }, {
14 | "@id": "ex:fred",
15 | "ex:name": [{"@value": "Fred"}]
16 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st20-in.nq:
--------------------------------------------------------------------------------
1 | "Fred" .
2 | << >> "8.0E-1"^^ .
3 | << >> .
4 | .
5 | "Bob" .
6 |
--------------------------------------------------------------------------------
/tests/fromRdf/st20-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "@annotation": [{
7 | "ex:certainty": [{
8 | "@value": "8.0E-1",
9 | "@type": "http://www.w3.org/2001/XMLSchema#double"
10 | }],
11 | "ex:source": [{"@id": "http://example.org/"}]
12 | }]
13 | }]
14 | }, {
15 | "@id": "ex:fred",
16 | "ex:name": [{"@value": "Fred"}]
17 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st20a-in.nq:
--------------------------------------------------------------------------------
1 | << >> .
2 | << >> "8.0E-1"^^ .
3 | .
4 | "Bob" .
5 | "Fred" .
6 |
--------------------------------------------------------------------------------
/tests/fromRdf/st20a-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{
5 | "@id": "ex:fred",
6 | "@annotation": [{
7 | "ex:certainty": [{
8 | "@value": "8.0E-1",
9 | "@type": "http://www.w3.org/2001/XMLSchema#double"
10 | }],
11 | "ex:source": [{"@id": "http://example.org/"}]
12 | }]
13 | }]
14 | }, {
15 | "@id": "ex:fred",
16 | "ex:name": [{"@value": "Fred"}]
17 | }]
18 |
--------------------------------------------------------------------------------
/tests/fromRdf/st20b-in.nq:
--------------------------------------------------------------------------------
1 | .
2 | "Bob" .
3 | "Fred" .
4 |
--------------------------------------------------------------------------------
/tests/fromRdf/st20b-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}],
4 | "ex:knows": [{"@id": "ex:fred"}]
5 | },
6 | {
7 | "@id": "ex:fred",
8 | "ex:name": [{"@value": "Fred"}]
9 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st28-in.nq:
--------------------------------------------------------------------------------
1 | << _:b0>> "value2" .
2 | <<<< _:b0>> "value2">> "8.0E-1"^^ .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st28-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "_:b0"}]
5 | },
6 | "ex:prop": [{
7 | "@value": "value2",
8 | "@annotation": [{
9 | "ex:certainty": [{
10 | "@value": "8.0E-1",
11 | "@type": "http://www.w3.org/2001/XMLSchema#double"
12 | }]
13 | }]
14 | }]
15 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st29-in.nq:
--------------------------------------------------------------------------------
1 | << "value">> .
2 | << << "value">>>> "8.0E-1"^^ .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st29-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:subj",
3 | "ex:value": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@value": "value"}]
7 | },
8 | "@annotation": [{
9 | "ex:certainty": [{
10 | "@value": "8.0E-1",
11 | "@type": "http://www.w3.org/2001/XMLSchema#double"
12 | }]
13 | }]
14 | }]
15 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st32-in.nq:
--------------------------------------------------------------------------------
1 | << >> .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st32-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:value2",
3 | "ex:rel": [{
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": [{"@id": "ex:value"}]
7 | }
8 | }]
9 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st33-in.nq:
--------------------------------------------------------------------------------
1 | << >> .
2 | << >> .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st33-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": [{"@id": "ex:value"}]
5 | },
6 | "ex:rel": [{"@id": "ex:subj"}],
7 | "ex:prop": [{"@id": "ex:value2"}]
8 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st34-in.nq:
--------------------------------------------------------------------------------
1 | "Bob" .
2 | .
3 | "Fred" .
4 | << >> "8.0E-1"^^ .
5 |
--------------------------------------------------------------------------------
/tests/fromRdf/st34-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:name": [{"@value": "Bob"}]
4 | }, {
5 | "@id": "ex:fred",
6 | "ex:name": [{"@value": "Fred"}],
7 | "ex:knows": [{
8 | "@id": "ex:bob",
9 | "@annotation": [{
10 | "ex:certainty": [{
11 | "@value": "8.0E-1",
12 | "@type": "http://www.w3.org/2001/XMLSchema#double"
13 | }]
14 | }]
15 | }]
16 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st35-in.nq:
--------------------------------------------------------------------------------
1 | << >> .
2 | .
3 | << >> "8.0E-1"^^ .
4 |
--------------------------------------------------------------------------------
/tests/fromRdf/st35-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:knows": [{
4 | "@id": "ex:jane",
5 | "@annotation": [{
6 | "ex:certainty": [{
7 | "@value": "8.0E-1",
8 | "@type": "http://www.w3.org/2001/XMLSchema#double"
9 | }]
10 | }]
11 | }]
12 | },{
13 | "@id": "ex:sue",
14 | "ex:claims": [{
15 | "@id": {
16 | "@id": "ex:bob",
17 | "ex:knows": [{"@id": "ex:jane"}]
18 | }
19 | }]
20 | }]
21 |
--------------------------------------------------------------------------------
/tests/fromRdf/st36-in.nq:
--------------------------------------------------------------------------------
1 | <<_:b0 "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/fromRdf/st36-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "_:b0",
4 | "ex:prop": [{"@value": "value"}]
5 | },
6 | "ex:prop": [{"@value": "value2"}]
7 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st37-in.nq:
--------------------------------------------------------------------------------
1 | << "23"^^>> "8.0E-1"^^ .
2 | "23"^^ .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st37-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:bob",
3 | "ex:age": [{
4 | "@type": "http://www.w3.org/2001/XMLSchema#integer",
5 | "@value": "23",
6 | "@annotation": [{
7 | "ex:certainty": [{
8 | "@value": "8.0E-1",
9 | "@type": "http://www.w3.org/2001/XMLSchema#double"
10 | }]
11 | }]
12 | }]
13 | }]
14 |
--------------------------------------------------------------------------------
/tests/fromRdf/st38-in.nq:
--------------------------------------------------------------------------------
1 | << >> "8.0E-1"^^ .
2 | <<<< >> "8.0E-1"^^>> .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st38-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": {
3 | "@id": "http://example.org/bob",
4 | "http://example.org/knows": [{"@id": "http://example.org/alice"}]
5 | },
6 | "http://example.org/certainty": [{
7 | "@value": "8.0E-1",
8 | "@type": "http://www.w3.org/2001/XMLSchema#double",
9 | "@annotation": [{
10 | "http://example.org/claims": [{"@id": "http://example.org/ted"}]
11 | }]
12 | }]
13 | }]
--------------------------------------------------------------------------------
/tests/fromRdf/st39-in.nq:
--------------------------------------------------------------------------------
1 | .
2 | << >> << >> .
3 |
--------------------------------------------------------------------------------
/tests/fromRdf/st39-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{
4 | "@id": "ex:o",
5 | "@annotation": [{
6 | "ex:r": [{
7 | "@id": {
8 | "@id": "ex:s1",
9 | "ex:p1": [{"@id": "ex:o1"}]
10 | }
11 | }]
12 | }]
13 | }]
14 | }]
15 |
--------------------------------------------------------------------------------
/tests/fromRdf/st40-in.nq:
--------------------------------------------------------------------------------
1 | .
2 | << >> .
3 | <<<< >> >> .
4 |
--------------------------------------------------------------------------------
/tests/fromRdf/st40-out.jsonld:
--------------------------------------------------------------------------------
1 | [{
2 | "@id": "ex:s",
3 | "ex:p": [{
4 | "@id": "ex:o",
5 | "@annotation": [{
6 | "ex:r": [{
7 | "@id": "ex:s1",
8 | "@annotation": [{
9 | "ex:p1": [{"@id": "ex:o1"}]
10 | }]
11 | }]
12 | }]
13 | }]
14 | }]
15 |
--------------------------------------------------------------------------------
/tests/manifest.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | JSON-LD-star Test Suite
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | JSON-LD-star Test Suite
18 | This manifest loads additional manifests for specific behavior tests for JSON-LD-star
19 | This is an HTML version of a test manifest. The JSON-LD version of this manifest may be found at
20 | manifest.jsonld .
21 | The manifest vocabulary is described in the
22 | JSON-LD Test Vocabulary
23 | (JSON-LD ,
24 | Turtle )
25 | and is based on the RDF Test Vocabulary .
26 | The JSON-LD-star Test Suite is a set of tests that can
27 | be used to verify JSON-LD Processor for the RDF-star extensions to JSON-LD.
28 | More information and an RDFS definition of the test vocabulary can be found at vocab .
29 | General instructions for running the JSON-LD Test suites
30 | 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.
31 | Running tests
32 | The top-level manifest references the specific test manifests, which in turn reference each test associated with a particular type of behavior.
33 | Implementations create their own infrastructure for running the test suite. In particular, the following should be considered:
34 |
35 | For JSON-Ld-star tests, the specVersion
is set to JSON-LD-star
.
36 | 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.
37 |
38 | Contributing Tests
39 | If you would like to contribute a new test or a fix to an existing test,
40 | please follow these steps:
41 |
42 | Notify the JSON-LD Community mailing list, public-linked-json@w3.org,
43 | that you will be creating a new test or fix and the purpose of the
44 | change.
45 | Clone the git repository: git://github.com/json-ld/json-ld-star.git
46 | Make your changes and submit them via github, or via a 'git format-patch'
47 | to the JSON-LD Community Group mailing list .
48 |
49 | Distribution
50 | Distributed under the W3C Test Suite License . To contribute to a W3C Test Suite, see the policies and contribution forms .
51 | Disclaimer
52 | 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.
53 | 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.
54 | Code of Conduct
55 | W3C functions under a code of conduct .
56 |
57 |
58 | Test sequence:
59 |
60 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/tests/manifest.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@context": ["context.jsonld", {"@base": "manifest"}],
3 | "@id": "",
4 | "@type": "mf:Manifest",
5 | "name": "JSON-LD-star Test Suite",
6 | "description": "This manifest loads additional manifests for specific behavior tests for [JSON-LD-star](https://json-ld.github.io/json-ld-star)",
7 | "sequence": [
8 | "compact-manifest.jsonld",
9 | "expand-manifest.jsonld",
10 | "flatten-manifest.jsonld",
11 | "fromRdf-manifest.jsonld",
12 | "toRdf-manifest.jsonld"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/tests/template.haml:
--------------------------------------------------------------------------------
1 | -# This template is used for generating the HTML representation of the test suite manifests.
2 | - require 'cgi'
3 | - require 'digest'
4 | !!! 5
5 | %html
6 | %head
7 | %meta{"http-equiv" => "Content-Type", :content => "text/html;charset=utf-8"}
8 | %title
9 | = manifest['name']
10 | %link{rel: "alternate", href: "#{json_file}"}
11 | %link{rel: "stylesheet", href: "https://www.w3.org/StyleSheets/TR/base"}
12 | %body
13 | %p
14 | %a{href: "http://www.w3.org/"}
15 | %img{src: "http://www.w3.org/Icons/w3c_home", alt: "W3C", height: 48, width: 72}
16 | %h1<=manifest['name']
17 | :markdown
18 | #{manifest['description']}
19 | :markdown
20 | This is an HTML version of a test manifest. The JSON-LD version of this manifest may be found at
21 | [#{json_file}](#{json_file}).
22 | The manifest vocabulary is described in the
23 | [JSON-LD Test Vocabulary](http://w3c.github.io/json-ld-api/tests/vocab.html)
24 | ([JSON-LD](ttp://w3c.github.io/json-ld-api/tests/vocab.jsonld),
25 | [Turtle](ttp://w3c.github.io/json-ld-api/tests/vocab.ttl))
26 | and is based on the [RDF Test Vocabulary](http://www.w3.org/TR/2014/NOTE-rdf11-testcases-20140225/).
27 |
28 | The JSON-LD-star Test Suite is a set of tests that can
29 | be used to verify JSON-LD Processor for the RDF-star extensions to JSON-LD.
30 |
31 | More information and an RDFS definition of the test vocabulary can be found at [vocab](https://w3c.github.io/json-ld-api/tests/vocab).
32 |
33 | ## General instructions for running the JSON-LD Test suites
34 |
35 | 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.
36 |
37 | # Running tests
38 |
39 | The top-level [manifest](manifest.jsonld) references the specific test manifests, which in turn reference each test associated with a particular type of behavior.
40 |
41 | Implementations create their own infrastructure for running the test suite. In particular, the following should be considered:
42 |
43 | * For JSON-Ld-star tests, the `specVersion` is set to `JSON-LD-star`.
44 | * 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.
45 |
46 | # Contributing Tests
47 |
48 | If you would like to contribute a new test or a fix to an existing test,
49 | please follow these steps:
50 |
51 | 1. Notify the JSON-LD Community mailing list, public-linked-json@w3.org,
52 | that you will be creating a new test or fix and the purpose of the
53 | change.
54 | 2. Clone the git repository: git://github.com/json-ld/json-ld-star.git
55 | 3. Make your changes and submit them via github, or via a 'git format-patch'
56 | to the [JSON-LD Community Group mailing list](mailto:public-linked-json@w3.org).
57 |
58 |
59 | ## Distribution
60 |
61 | Distributed under the [W3C Test Suite License](http://www.w3.org/Consortium/Legal/2008/04-testsuite-license). To contribute to a W3C Test Suite, see the [policies and contribution forms](http://www.w3.org/2004/10/27-testcases).
62 |
63 | ## Disclaimer
64 |
65 | 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.
66 | 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.
67 |
68 | ## Code of Conduct
69 |
70 | W3C functions under a [code of conduct](https://www.w3.org/Consortium/cepc/).
71 |
72 | - if manifest['baseIri']
73 | %dl
74 | %dt="baseIri"
75 | %dd=manifest['baseIri']
76 | - if manifest['sequence']
77 | %section
78 | %h2
79 | Test sequence:
80 | - if manifest['sequence'].first.is_a?(String)
81 | %ul
82 | - manifest['sequence'].each do |man|
83 | - man_name = man.sub('.jsonld', '')
84 | %li
85 | %a{href: "#{man_name}.html"}<=man_name
86 | - else
87 | %dl.entries
88 | - manifest['sequence'].each do |entry|
89 | %dt{id: entry['@id'][1..-1]}
90 | ="Test #{entry['@id'][1..-1]} #{entry['name']}"
91 | %dd
92 | %dl.entry
93 | %dt="id"
94 | %dd=entry['@id']
95 | %dt="Type"
96 | %dd="#{Array(entry['@type']).join(', ')}"
97 | %dt="Purpose"
98 | %dd=entry['purpose']
99 | %dt="input"
100 | %dd
101 | %a{href: entry['input']}=entry['input']
102 | - if entry['context']
103 | %dt="context"
104 | %dd
105 | %a{href: entry['context']}=entry['context']
106 | - if entry['frame']
107 | %dt="frame"
108 | %dd
109 | %a{href: entry['frame']}=entry['frame']
110 | %dt="expect"
111 | %dd
112 | - if entry['@type'].to_s.include?('Negative')
113 | =entry['expectErrorCode']
114 | - else
115 | %a{href: entry['expect']}=entry['expect']
116 | - if entry['option']
117 | %dt="Options"
118 | %dd
119 | %dl.options
120 | - entry['option'].each do |k, v|
121 | %dt=k
122 | %dd=v
123 | - if entry['requires']
124 | %dt="Requires"
125 | %dd= entry['requires']
126 |
--------------------------------------------------------------------------------
/tests/toRdf/st01-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/toRdf/st02-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:knows": {
4 | "@id": "ex:fred",
5 | "@annotation": {
6 | "ex:certainty": 0.8
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/toRdf/st02-out.nq:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st03-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:bob",
3 | "ex:age": {
4 | "@value": 23,
5 | "@annotation": {
6 | "ex:certainty": 0.8
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/toRdf/st03-out.nq:
--------------------------------------------------------------------------------
1 | "23"^^ .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st04-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "ex:prop": "value"
4 | },
5 | "ex:prop": "value2"
6 | }
--------------------------------------------------------------------------------
/tests/toRdf/st04-out.nq:
--------------------------------------------------------------------------------
1 | <<_:b0 "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st05-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/toRdf/st05-out.nq:
--------------------------------------------------------------------------------
1 | << "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st06-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "_:rei",
4 | "ex:prop": "value"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/toRdf/st06-out.nq:
--------------------------------------------------------------------------------
1 | <<_:rei "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st07-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": "ex:Type"
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/toRdf/st07-out.nq:
--------------------------------------------------------------------------------
1 | << >> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st08-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "ex:value"}
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/toRdf/st08-out.nq:
--------------------------------------------------------------------------------
1 | << >> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st09-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": {"@id": "_:value"}
5 | },
6 | "ex:prop": "value2"
7 | }
--------------------------------------------------------------------------------
/tests/toRdf/st09-out.nq:
--------------------------------------------------------------------------------
1 | << _:value>> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st10-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": {
4 | "@id": "ex:rei",
5 | "ex:prop": "value3"
6 | },
7 | "ex:prop": "value"
8 | },
9 | "ex:prop": "value2"
10 | }
--------------------------------------------------------------------------------
/tests/toRdf/st10-out.nq:
--------------------------------------------------------------------------------
1 | <<<< "value3">> "value">> "value2" .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st11-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei"
4 | },
5 | "ex:prop": "value3"
6 | }
--------------------------------------------------------------------------------
/tests/toRdf/st12-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "ex:prop": ["value1", "value2"]
5 | },
6 | "ex:prop": "value3"
7 | }
--------------------------------------------------------------------------------
/tests/toRdf/st13-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": ["ex:Type1", "ex:Type2"]
5 | },
6 | "ex:prop": "value3"
7 | }
--------------------------------------------------------------------------------
/tests/toRdf/st14-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": {
3 | "@id": "ex:rei",
4 | "@type": "ex:Type",
5 | "ex:prop": "value"
6 | },
7 | "ex:prop": "value2"
8 | }
--------------------------------------------------------------------------------
/tests/toRdf/st15-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/toRdf/st15-out.nq:
--------------------------------------------------------------------------------
1 | << "value">> .
2 |
--------------------------------------------------------------------------------
/tests/toRdf/st16-in.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "@id": "ex:subj",
3 | "ex:value": {
4 | "@id": {
5 | "@id": "ex:rei",
6 | "ex:prop": "value"
7 | },
8 | "ex:prop": "value2"
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/toRdf/st16-out.nq:
--------------------------------------------------------------------------------
1 | << "value">> .
2 | << "value">>