Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 717ea94

Browse files
committed
Remove caveat about expanding values of terms which are graph containers where the value is already a graph.
Fixes #144. Relates to #143.
1 parent 3061eb7 commit 717ea94

File tree

9 files changed

+22
-21
lines changed

9 files changed

+22
-21
lines changed

index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,8 +2240,7 @@ <h3>Algorithm</h3>
22402240
and <a data-link-for="JsonLdOptions">ordered</a> flags</span>.</li>
22412241
<li>For each <var>item</var> in <var>index value</var>:
22422242
<ol class="algorithm changed">
2243-
<li>If <var>container mapping</var> includes <code>@graph</code>
2244-
and if <var>item</var> is not a <a>graph object</a>,
2243+
<li>If <var>container mapping</var> includes <code>@graph</code>,
22452244
set <var>item</var> to a new <a>map</a> containing the key-value pair
22462245
<code>@graph</code>-<var>item</var>,
22472246
ensuring that the value is represented using an <a>array</a>.</li>

tests/expand-manifest.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@
580580
}, {
581581
"@id": "#t0081",
582582
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
583-
"name": "Does not create an @graph container if value is a graph",
583+
"name": "Creates an @graph container if value is a graph",
584584
"purpose": "Don't double-expand an already expanded graph",
585585
"input": "expand/0081-in.jsonld",
586586
"expect": "expand/0081-out.jsonld",

tests/expand/0081-out.jsonld

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[{
22
"http://example.org/input": [{
33
"@graph": [{
4-
"http://example.org/value": [{"@value": "x"}]
4+
"@graph": [{
5+
"http://example.org/value": [{"@value": "x"}]
6+
}]
57
}]
68
}]
79
}]

tests/toRdf-manifest.jsonld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@
974974
}, {
975975
"@id": "#te081",
976976
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
977-
"name": "Does not create an @graph container if value is a graph",
977+
"name": "Creates an @graph container if value is a graph",
978978
"purpose": "Don't double-expand an already expanded graph",
979979
"input": "toRdf/e081-in.jsonld",
980980
"expect": "toRdf/e081-out.nq",
@@ -1090,7 +1090,7 @@
10901090
}, {
10911091
"@id": "#te095",
10921092
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
1093-
"name": "Does not create an @graph container if value is a graph (multiple objects)",
1093+
"name": "Creates an @graph container if value is a graph (multiple objects)",
10941094
"purpose": "Don't double-expand an already expanded graph",
10951095
"input": "toRdf/e095-in.jsonld",
10961096
"expect": "toRdf/e095-out.nq",
@@ -1146,23 +1146,23 @@
11461146
}, {
11471147
"@id": "#te102",
11481148
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
1149-
"name": "Do not expand @graph container if value is a graph (multiple objects)",
1149+
"name": "Expand @graph container if value is a graph (multiple objects)",
11501150
"purpose": "Does not create a new graph object if indexed value is already a graph object",
11511151
"input": "toRdf/e102-in.jsonld",
11521152
"expect": "toRdf/e102-out.nq",
11531153
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
11541154
}, {
11551155
"@id": "#te103",
11561156
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
1157-
"name": "Do not expand @graph container if value is a graph (multiple graphs)",
1157+
"name": "Expand @graph container if value is a graph (multiple graphs)",
11581158
"purpose": "Does not create a new graph object if indexed value is already a graph object",
11591159
"input": "toRdf/e103-in.jsonld",
11601160
"expect": "toRdf/e103-out.nq",
11611161
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
11621162
}, {
11631163
"@id": "#te104",
11641164
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
1165-
"name": "Does not create an @graph container if value is a graph (mixed graph and object)",
1165+
"name": "Creates an @graph container if value is a graph (mixed graph and object)",
11661166
"purpose": "Don't double-expand an already expanded graph",
11671167
"input": "toRdf/e104-in.jsonld",
11681168
"expect": "toRdf/e104-out.nq",

tests/toRdf/e081-out.nq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
_:b0 <http://example.org/input> _:b1 .
2-
_:b2 <http://example.org/value> "x" _:b1 .
2+
_:b3 <http://example.org/value> "x" _:b2 .

tests/toRdf/e095-out.nq

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_:b4 <http://example.org/value> "y" _:b3 .
2-
_:b0 <http://example.org/input> _:b3 .
31
_:b0 <http://example.org/input> _:b1 .
4-
_:b2 <http://example.org/value> "x" _:b1 .
2+
_:b0 <http://example.org/input> _:b4 .
3+
_:b3 <http://example.org/value> "x" _:b2 .
4+
_:b6 <http://example.org/value> "y" _:b5 .

tests/toRdf/e102-out.nq

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
_:b0 <http://example.org/input> _:b1 .
2-
_:b3 <http://example.org/value> "y" _:b1 .
3-
_:b2 <http://example.org/value> "x" _:b1 .
2+
_:b3 <http://example.org/value> "x" _:b2 .
3+
_:b4 <http://example.org/value> "y" _:b2 .

tests/toRdf/e103-out.nq

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_:b4 <http://example.org/value> "y" _:b3 .
2-
_:b0 <http://example.org/input> _:b3 .
31
_:b0 <http://example.org/input> _:b1 .
4-
_:b2 <http://example.org/value> "x" _:b1 .
2+
_:b0 <http://example.org/input> _:b4 .
3+
_:b3 <http://example.org/value> "x" _:b2 .
4+
_:b6 <http://example.org/value> "y" _:b5 .

tests/toRdf/e104-out.nq

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_:b4 <http://example.org/value> "y" _:b3 .
2-
_:b0 <http://example.org/input> _:b3 .
1+
_:b3 <http://example.org/value> "x" _:b2 .
2+
_:b5 <http://example.org/value> "y" _:b4 .
3+
_:b0 <http://example.org/input> _:b4 .
34
_:b0 <http://example.org/input> _:b1 .
4-
_:b2 <http://example.org/value> "x" _:b1 .

0 commit comments

Comments
 (0)