Skip to content

Commit 3c2971a

Browse files
committed
Add new and updated tests for framing
1 parent 455238f commit 3c2971a

39 files changed

+1321
-33
lines changed

ld/testdata/frame-0047-out.jsonld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"@type": "Class",
66
"preserve": {
77
"@id": "urn:gr-1",
8-
"@graph": [{
8+
"@graph": {
99
"@id": "urn:id-2",
1010
"term": "data"
11-
}]
11+
}
1212
}
1313
}]
1414
}

ld/testdata/frame-0048-out.jsonld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
},
1010
"preserve": {
1111
"@id": "urn:graph-1",
12-
"@graph": [{
12+
"@graph": {
1313
"@id": "urn:id-3",
1414
"term": "bar"
15-
}]
15+
}
1616
}
1717
}]
1818
}

ld/testdata/frame-0049-out.jsonld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"@id": "_:b0",
1212
"deep": {
1313
"@id": "_:b1",
14-
"@graph": [{
14+
"@graph": {
1515
"@id": "urn:id-3",
1616
"term": "bar"
17-
}]
17+
}
1818
}
1919
}
2020
}]

ld/testdata/frame-0050-out.jsonld

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@
77
"name": "Library",
88
"contains": {
99
"@id": "http://example.org/graphs/books",
10-
"@graph": [
11-
{
12-
"@id": "http://example.org/library/the-republic",
13-
"@type": "Book",
14-
"creator": "Plato",
15-
"title": "The Republic",
16-
"contains": {
17-
"@id": "http://example.org/library/the-republic#introduction",
18-
"@type": "Chapter",
19-
"description": "An introductory chapter on The Republic.",
20-
"title": "The Introduction"
21-
}
10+
"@graph": {
11+
"@id": "http://example.org/library/the-republic",
12+
"@type": "Book",
13+
"creator": "Plato",
14+
"title": "The Republic",
15+
"contains": {
16+
"@id": "http://example.org/library/the-republic#introduction",
17+
"@type": "Chapter",
18+
"description": "An introductory chapter on The Republic.",
19+
"title": "The Introduction"
2220
}
23-
]
21+
}
2422
}
2523
}
2624
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@context": {
3+
"dc": "http://purl.org/dc/elements/1.1/",
4+
"ex": "http://example.org/vocab#"
5+
},
6+
"@type": "ex:Library",
7+
"ex:contains": {
8+
"@type": "ex:Book",
9+
"ex:contains": {
10+
"@type": "ex:Chapter"
11+
}
12+
}
13+
}

ld/testdata/frame-g001-in.jsonld

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"@context": {
3+
"dc": "http://purl.org/dc/elements/1.1/",
4+
"ex": "http://example.org/vocab#",
5+
"ex:contains": {"@type": "@id"}
6+
},
7+
"@graph": [
8+
{
9+
"@id": "http://example.org/test/#library",
10+
"@type": "ex:Library",
11+
"ex:contains": "http://example.org/test#book"
12+
},
13+
{
14+
"@id": "http://example.org/test#book",
15+
"@type": "ex:Book",
16+
"dc:contributor": "Writer",
17+
"dc:title": "My Book",
18+
"ex:contains": "http://example.org/test#chapter"
19+
},
20+
{
21+
"@id": "http://example.org/test#chapter",
22+
"@type": "ex:Chapter",
23+
"dc:description": "Fun",
24+
"dc:title": "Chapter One"
25+
}
26+
]
27+
}

ld/testdata/frame-g001-out.jsonld

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"@context": {
3+
"dc": "http://purl.org/dc/elements/1.1/",
4+
"ex": "http://example.org/vocab#"
5+
},
6+
"@id": "http://example.org/test/#library",
7+
"@type": "ex:Library",
8+
"ex:contains": {
9+
"@id": "http://example.org/test#book",
10+
"@type": "ex:Book",
11+
"dc:contributor": "Writer",
12+
"dc:title": "My Book",
13+
"ex:contains": {
14+
"@id": "http://example.org/test#chapter",
15+
"@type": "ex:Chapter",
16+
"dc:description": "Fun",
17+
"dc:title": "Chapter One"
18+
}
19+
}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"@context": {
3+
"dc": "http://purl.org/dc/elements/1.1/",
4+
"ex": "http://example.org/vocab#"
5+
},
6+
"@type": "ex:Library",
7+
"@embed": "@always",
8+
"ex:contains": {
9+
"@type": "ex:Book",
10+
"@embed": "@always",
11+
"ex:contains": {
12+
"@type": "ex:Chapter",
13+
"@embed": "@always"
14+
},
15+
"ex:bookmark": {
16+
"@type": "ex:Chapter",
17+
"@embed": "@always"
18+
}
19+
}
20+
}

ld/testdata/frame-g002-in.jsonld

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"@context": {
3+
"dc": "http://purl.org/dc/elements/1.1/",
4+
"ex": "http://example.org/vocab#",
5+
"ex:contains": {"@type": "@id"},
6+
"ex:bookmark": {"@type": "@id"}
7+
},
8+
"@graph": [
9+
{
10+
"@id": "http://example.org/test/#library",
11+
"@type": "ex:Library",
12+
"ex:contains": "http://example.org/test#book"
13+
},
14+
{
15+
"@id": "http://example.org/test#book",
16+
"@type": "ex:Book",
17+
"dc:contributor": "Writer",
18+
"dc:title": "My Book",
19+
"ex:contains": "http://example.org/test#chapter",
20+
"ex:bookmark": "http://example.org/test#chapter"
21+
},
22+
{
23+
"@id": "http://example.org/test#chapter",
24+
"@type": "ex:Chapter",
25+
"dc:description": "Fun",
26+
"dc:title": "Chapter One"
27+
}
28+
]
29+
}

ld/testdata/frame-g002-out.jsonld

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"@context": {
3+
"dc": "http://purl.org/dc/elements/1.1/",
4+
"ex": "http://example.org/vocab#"
5+
},
6+
"@graph": [{
7+
"@id": "http://example.org/test/#library",
8+
"@type": "ex:Library",
9+
"ex:contains": {
10+
"@id": "http://example.org/test#book",
11+
"@type": "ex:Book",
12+
"dc:contributor": "Writer",
13+
"dc:title": "My Book",
14+
"ex:contains": {
15+
"@id": "http://example.org/test#chapter",
16+
"@type": "ex:Chapter",
17+
"dc:description": "Fun",
18+
"dc:title": "Chapter One"
19+
},
20+
"ex:bookmark": {
21+
"@id": "http://example.org/test#chapter",
22+
"@type": "ex:Chapter",
23+
"dc:description": "Fun",
24+
"dc:title": "Chapter One"
25+
}
26+
}
27+
}]
28+
}

0 commit comments

Comments
 (0)