Skip to content

Commit 8be129e

Browse files
committed
Bump up by one c034 and c035 in expand and toRdf to assist merge.
1 parent 4918b31 commit 8be129e

File tree

10 files changed

+171
-105
lines changed

10 files changed

+171
-105
lines changed

tests/expand-manifest.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,22 @@
11961196
"input": "expand/c034-in.jsonld",
11971197
"expect": "expand/c034-out.jsonld",
11981198
"option": {"specVersion": "json-ld-1.1"}
1199+
}, {
1200+
"@id": "#tc035",
1201+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1202+
"name": "property-scoped contexts which are alias of @nest",
1203+
"purpose": "Nesting terms may have property-scoped contexts defined.",
1204+
"input": "expand/c035-in.jsonld",
1205+
"expect": "expand/c035-out.jsonld",
1206+
"option": {"specVersion": "json-ld-1.1"}
1207+
}, {
1208+
"@id": "#tc036",
1209+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1210+
"name": "Bibframe example (poor-mans inferrence)",
1211+
"purpose": "Nesting terms may have property-scoped contexts defined.",
1212+
"input": "expand/c036-in.jsonld",
1213+
"expect": "expand/c036-out.jsonld",
1214+
"option": {"specVersion": "json-ld-1.1"}
11991215
}, {
12001216
"@id": "#tdi01",
12011217
"@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],

tests/expand/c035-in.jsonld

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,15 @@
11
{
22
"@context": {
33
"@version": 1.1,
4-
"@base": "http://example.org/base/",
5-
"@vocab": "http://purl.org/dc/terms/",
6-
"bibo": "http://purl.org/ontology/bibo/",
7-
"Print": "bibo:Book",
8-
"name": "http://www.w3.org/2000/01/rdf-schema#label",
9-
"instanceOf": "@nest",
10-
"contributionByRole": {
4+
"@vocab": "http://example.org/",
5+
"nest": {
116
"@id": "@nest",
127
"@context": {
13-
"agent": "@nest",
14-
"aut": "creator"
15-
}
16-
},
17-
"provisionActivityByType": {
18-
"@id": "@nest",
19-
"@context": {
20-
"Publication": {
21-
"@id": "@nest",
22-
"@context": {"date": "published", "agent": "publisher"}
23-
}
24-
}
25-
},
26-
"identifiedByType": {
27-
"@id": "@nest",
28-
"@context": {
29-
"Isbn": {"@id": "@nest"},
30-
"value": "bibo:isbn"
8+
"@vocab": "http://example.org/nest/"
319
}
3210
}
3311
},
34-
"@id": "book/one",
35-
"@type": "Print",
36-
"instanceOf": {
37-
"contributionByRole": {
38-
"aut": {
39-
"agent": {"name": "Some Body"}
40-
}
41-
}
42-
},
43-
"identifiedByType": {
44-
"Isbn": {
45-
"value": "1234567890"
46-
}
47-
},
48-
"provisionActivityByType": {
49-
"Publication": {
50-
"date": "1999",
51-
"agent": {"name": "PubCorp"}
52-
}
12+
"nest": {
13+
"property": "should be in /nest"
5314
}
5415
}

tests/expand/c035-out.jsonld

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
[{
2-
"@id": "http://example.org/base/book/one",
3-
"@type": ["http://purl.org/ontology/bibo/Book"],
4-
"http://purl.org/dc/terms/creator": [{
5-
"http://www.w3.org/2000/01/rdf-schema#label": [{"@value": "Some Body"}]
6-
}],
7-
"http://purl.org/ontology/bibo/isbn": [{"@value": "1234567890"}],
8-
"http://purl.org/dc/terms/published": [{"@value": "1999"}],
9-
"http://purl.org/dc/terms/publisher": [{
10-
"http://www.w3.org/2000/01/rdf-schema#label": [{"@value": "PubCorp"}]
11-
}]
2+
"http://example.org/nest/property": [{"@value": "should be in /nest"}]
123
}]

tests/expand/c036-in.jsonld

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@base": "http://example.org/base/",
5+
"@vocab": "http://purl.org/dc/terms/",
6+
"bibo": "http://purl.org/ontology/bibo/",
7+
"Print": "bibo:Book",
8+
"name": "http://www.w3.org/2000/01/rdf-schema#label",
9+
"instanceOf": "@nest",
10+
"contributionByRole": {
11+
"@id": "@nest",
12+
"@context": {
13+
"agent": "@nest",
14+
"aut": "creator"
15+
}
16+
},
17+
"provisionActivityByType": {
18+
"@id": "@nest",
19+
"@context": {
20+
"Publication": {
21+
"@id": "@nest",
22+
"@context": {"date": "published", "agent": "publisher"}
23+
}
24+
}
25+
},
26+
"identifiedByType": {
27+
"@id": "@nest",
28+
"@context": {
29+
"Isbn": {"@id": "@nest"},
30+
"value": "bibo:isbn"
31+
}
32+
}
33+
},
34+
"@id": "book/one",
35+
"@type": "Print",
36+
"instanceOf": {
37+
"contributionByRole": {
38+
"aut": {
39+
"agent": {"name": "Some Body"}
40+
}
41+
}
42+
},
43+
"identifiedByType": {
44+
"Isbn": {
45+
"value": "1234567890"
46+
}
47+
},
48+
"provisionActivityByType": {
49+
"Publication": {
50+
"date": "1999",
51+
"agent": {"name": "PubCorp"}
52+
}
53+
}
54+
}

tests/expand/c036-out.jsonld

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[{
2+
"@id": "http://example.org/base/book/one",
3+
"@type": ["http://purl.org/ontology/bibo/Book"],
4+
"http://purl.org/dc/terms/creator": [{
5+
"http://www.w3.org/2000/01/rdf-schema#label": [{"@value": "Some Body"}]
6+
}],
7+
"http://purl.org/ontology/bibo/isbn": [{"@value": "1234567890"}],
8+
"http://purl.org/dc/terms/published": [{"@value": "1999"}],
9+
"http://purl.org/dc/terms/publisher": [{
10+
"http://www.w3.org/2000/01/rdf-schema#label": [{"@value": "PubCorp"}]
11+
}]
12+
}]

tests/toRdf-manifest.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,22 @@
668668
"input": "toRdf/c034-in.jsonld",
669669
"expect": "toRdf/c034-out.nq",
670670
"option": {"specVersion": "json-ld-1.1"}
671+
}, {
672+
"@id": "#tc035",
673+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
674+
"name": "property-scoped contexts which are alias of @nest",
675+
"purpose": "Nesting terms may have property-scoped contexts defined.",
676+
"input": "toRdf/c035-in.jsonld",
677+
"expect": "toRdf/c035-out.nq",
678+
"option": {"specVersion": "json-ld-1.1"}
679+
}, {
680+
"@id": "#tc036",
681+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
682+
"name": "Bibframe example (poor-mans inferrence)",
683+
"purpose": "Nesting terms may have property-scoped contexts defined.",
684+
"input": "toRdf/c036-in.jsonld",
685+
"expect": "toRdf/c036-out.nq",
686+
"option": {"specVersion": "json-ld-1.1"}
671687
}, {
672688
"@id": "#tdi01",
673689
"@type": [ "jld:PositiveEvaluationTest", "jld:ToRDFTest" ],

tests/toRdf/c035-in.jsonld

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,15 @@
11
{
22
"@context": {
33
"@version": 1.1,
4-
"@base": "http://example.org/base/",
5-
"@vocab": "http://purl.org/dc/terms/",
6-
"bibo": "http://purl.org/ontology/bibo/",
7-
"Print": "bibo:Book",
8-
"name": "http://www.w3.org/2000/01/rdf-schema#label",
9-
"instanceOf": "@nest",
10-
"contributionByRole": {
4+
"@vocab": "http://example.org/",
5+
"nest": {
116
"@id": "@nest",
127
"@context": {
13-
"agent": "@nest",
14-
"aut": "creator"
15-
}
16-
},
17-
"provisionActivityByType": {
18-
"@id": "@nest",
19-
"@context": {
20-
"Publication": {
21-
"@id": "@nest",
22-
"@context": {"date": "published", "agent": "publisher"}
23-
}
24-
}
25-
},
26-
"identifiedByType": {
27-
"@id": "@nest",
28-
"@context": {
29-
"Isbn": {"@id": "@nest"},
30-
"value": "bibo:isbn"
8+
"@vocab": "http://example.org/nest/"
319
}
3210
}
3311
},
34-
"@id": "book/one",
35-
"@type": "Print",
36-
"instanceOf": {
37-
"contributionByRole": {
38-
"aut": {
39-
"agent": {"name": "Some Body"}
40-
}
41-
}
42-
},
43-
"identifiedByType": {
44-
"Isbn": {
45-
"value": "1234567890"
46-
}
47-
},
48-
"provisionActivityByType": {
49-
"Publication": {
50-
"date": "1999",
51-
"agent": {"name": "PubCorp"}
52-
}
12+
"nest": {
13+
"property": "should be in /nest"
5314
}
5415
}

tests/toRdf/c035-out.nq

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
<http://example.org/base/book/one> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/ontology/bibo/Book> .
2-
<http://example.org/base/book/one> <http://purl.org/dc/terms/published> "1999" .
3-
<http://example.org/base/book/one> <http://purl.org/ontology/bibo/isbn> "1234567890" .
4-
<http://example.org/base/book/one> <http://purl.org/dc/terms/creator> _:b0 .
5-
<http://example.org/base/book/one> <http://purl.org/dc/terms/publisher> _:b1 .
6-
_:b0 <http://www.w3.org/2000/01/rdf-schema#label> "Some Body" .
7-
_:b1 <http://www.w3.org/2000/01/rdf-schema#label> "PubCorp" .
1+
_:b0 <http://example.org/nest/property> "should be in /nest" .

tests/toRdf/c036-in.jsonld

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@base": "http://example.org/base/",
5+
"@vocab": "http://purl.org/dc/terms/",
6+
"bibo": "http://purl.org/ontology/bibo/",
7+
"Print": "bibo:Book",
8+
"name": "http://www.w3.org/2000/01/rdf-schema#label",
9+
"instanceOf": "@nest",
10+
"contributionByRole": {
11+
"@id": "@nest",
12+
"@context": {
13+
"agent": "@nest",
14+
"aut": "creator"
15+
}
16+
},
17+
"provisionActivityByType": {
18+
"@id": "@nest",
19+
"@context": {
20+
"Publication": {
21+
"@id": "@nest",
22+
"@context": {"date": "published", "agent": "publisher"}
23+
}
24+
}
25+
},
26+
"identifiedByType": {
27+
"@id": "@nest",
28+
"@context": {
29+
"Isbn": {"@id": "@nest"},
30+
"value": "bibo:isbn"
31+
}
32+
}
33+
},
34+
"@id": "book/one",
35+
"@type": "Print",
36+
"instanceOf": {
37+
"contributionByRole": {
38+
"aut": {
39+
"agent": {"name": "Some Body"}
40+
}
41+
}
42+
},
43+
"identifiedByType": {
44+
"Isbn": {
45+
"value": "1234567890"
46+
}
47+
},
48+
"provisionActivityByType": {
49+
"Publication": {
50+
"date": "1999",
51+
"agent": {"name": "PubCorp"}
52+
}
53+
}
54+
}

tests/toRdf/c036-out.nq

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<http://example.org/base/book/one> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/ontology/bibo/Book> .
2+
<http://example.org/base/book/one> <http://purl.org/dc/terms/published> "1999" .
3+
<http://example.org/base/book/one> <http://purl.org/ontology/bibo/isbn> "1234567890" .
4+
<http://example.org/base/book/one> <http://purl.org/dc/terms/creator> _:b0 .
5+
<http://example.org/base/book/one> <http://purl.org/dc/terms/publisher> _:b1 .
6+
_:b0 <http://www.w3.org/2000/01/rdf-schema#label> "Some Body" .
7+
_:b1 <http://www.w3.org/2000/01/rdf-schema#label> "PubCorp" .

0 commit comments

Comments
 (0)