json-ld 3.2.4 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/VERSION +1 -1
  4. data/lib/json/ld/api.rb +807 -771
  5. data/lib/json/ld/compact.rb +304 -304
  6. data/lib/json/ld/conneg.rb +179 -161
  7. data/lib/json/ld/context.rb +2079 -1913
  8. data/lib/json/ld/expand.rb +745 -666
  9. data/lib/json/ld/extensions.rb +14 -13
  10. data/lib/json/ld/flatten.rb +257 -247
  11. data/lib/json/ld/format.rb +202 -194
  12. data/lib/json/ld/frame.rb +525 -502
  13. data/lib/json/ld/from_rdf.rb +223 -204
  14. data/lib/json/ld/html/nokogiri.rb +123 -121
  15. data/lib/json/ld/html/rexml.rb +151 -147
  16. data/lib/json/ld/reader.rb +107 -100
  17. data/lib/json/ld/resource.rb +224 -205
  18. data/lib/json/ld/streaming_reader.rb +574 -507
  19. data/lib/json/ld/streaming_writer.rb +93 -92
  20. data/lib/json/ld/to_rdf.rb +171 -169
  21. data/lib/json/ld/utils.rb +270 -264
  22. data/lib/json/ld/version.rb +24 -14
  23. data/lib/json/ld/writer.rb +334 -311
  24. data/lib/json/ld.rb +103 -96
  25. metadata +56 -225
  26. data/spec/api_spec.rb +0 -132
  27. data/spec/compact_spec.rb +0 -3482
  28. data/spec/conneg_spec.rb +0 -373
  29. data/spec/context_spec.rb +0 -2056
  30. data/spec/expand_spec.rb +0 -4496
  31. data/spec/flatten_spec.rb +0 -1203
  32. data/spec/format_spec.rb +0 -115
  33. data/spec/frame_spec.rb +0 -2541
  34. data/spec/from_rdf_spec.rb +0 -1072
  35. data/spec/matchers.rb +0 -20
  36. data/spec/rdfstar_spec.rb +0 -25
  37. data/spec/reader_spec.rb +0 -883
  38. data/spec/resource_spec.rb +0 -76
  39. data/spec/spec_helper.rb +0 -281
  40. data/spec/streaming_reader_spec.rb +0 -237
  41. data/spec/streaming_writer_spec.rb +0 -145
  42. data/spec/suite_compact_spec.rb +0 -22
  43. data/spec/suite_expand_spec.rb +0 -36
  44. data/spec/suite_flatten_spec.rb +0 -34
  45. data/spec/suite_frame_spec.rb +0 -29
  46. data/spec/suite_from_rdf_spec.rb +0 -22
  47. data/spec/suite_helper.rb +0 -411
  48. data/spec/suite_html_spec.rb +0 -22
  49. data/spec/suite_http_spec.rb +0 -35
  50. data/spec/suite_remote_doc_spec.rb +0 -22
  51. data/spec/suite_to_rdf_spec.rb +0 -30
  52. data/spec/support/extensions.rb +0 -44
  53. data/spec/test-files/test-1-compacted.jsonld +0 -10
  54. data/spec/test-files/test-1-context.jsonld +0 -7
  55. data/spec/test-files/test-1-expanded.jsonld +0 -5
  56. data/spec/test-files/test-1-input.jsonld +0 -10
  57. data/spec/test-files/test-1-rdf.ttl +0 -8
  58. data/spec/test-files/test-2-compacted.jsonld +0 -20
  59. data/spec/test-files/test-2-context.jsonld +0 -7
  60. data/spec/test-files/test-2-expanded.jsonld +0 -16
  61. data/spec/test-files/test-2-input.jsonld +0 -20
  62. data/spec/test-files/test-2-rdf.ttl +0 -14
  63. data/spec/test-files/test-3-compacted.jsonld +0 -11
  64. data/spec/test-files/test-3-context.jsonld +0 -8
  65. data/spec/test-files/test-3-expanded.jsonld +0 -10
  66. data/spec/test-files/test-3-input.jsonld +0 -11
  67. data/spec/test-files/test-3-rdf.ttl +0 -8
  68. data/spec/test-files/test-4-compacted.jsonld +0 -10
  69. data/spec/test-files/test-4-context.jsonld +0 -7
  70. data/spec/test-files/test-4-expanded.jsonld +0 -6
  71. data/spec/test-files/test-4-input.jsonld +0 -10
  72. data/spec/test-files/test-4-rdf.ttl +0 -5
  73. data/spec/test-files/test-5-compacted.jsonld +0 -13
  74. data/spec/test-files/test-5-context.jsonld +0 -7
  75. data/spec/test-files/test-5-expanded.jsonld +0 -9
  76. data/spec/test-files/test-5-input.jsonld +0 -13
  77. data/spec/test-files/test-5-rdf.ttl +0 -7
  78. data/spec/test-files/test-6-compacted.jsonld +0 -10
  79. data/spec/test-files/test-6-context.jsonld +0 -7
  80. data/spec/test-files/test-6-expanded.jsonld +0 -10
  81. data/spec/test-files/test-6-input.jsonld +0 -10
  82. data/spec/test-files/test-6-rdf.ttl +0 -6
  83. data/spec/test-files/test-7-compacted.jsonld +0 -23
  84. data/spec/test-files/test-7-context.jsonld +0 -4
  85. data/spec/test-files/test-7-expanded.jsonld +0 -20
  86. data/spec/test-files/test-7-input.jsonld +0 -23
  87. data/spec/test-files/test-7-rdf.ttl +0 -14
  88. data/spec/test-files/test-8-compacted.jsonld +0 -34
  89. data/spec/test-files/test-8-context.jsonld +0 -11
  90. data/spec/test-files/test-8-expanded.jsonld +0 -24
  91. data/spec/test-files/test-8-frame.jsonld +0 -18
  92. data/spec/test-files/test-8-framed.jsonld +0 -25
  93. data/spec/test-files/test-8-input.jsonld +0 -30
  94. data/spec/test-files/test-8-rdf.ttl +0 -15
  95. data/spec/test-files/test-9-compacted.jsonld +0 -20
  96. data/spec/test-files/test-9-context.jsonld +0 -13
  97. data/spec/test-files/test-9-expanded.jsonld +0 -14
  98. data/spec/test-files/test-9-input.jsonld +0 -12
  99. data/spec/to_rdf_spec.rb +0 -1684
  100. data/spec/writer_spec.rb +0 -427
@@ -1,20 +0,0 @@
1
- {
2
- "@context": {
3
- "dc": "http://purl.org/dc/elements/1.1/",
4
- "ex": "http://example.org/vocab#"
5
- },
6
- "@id": "http://example.org/library",
7
- "@type": "ex:Library",
8
- "ex:contains": {
9
- "@id": "http://example.org/library/the-republic",
10
- "@type": "ex:Book",
11
- "dc:creator": "Plato",
12
- "dc:title": "The Republic",
13
- "ex:contains": {
14
- "@id": "http://example.org/library/the-republic#introduction",
15
- "@type": "ex:Chapter",
16
- "dc:description": "An introductory chapter on The Republic.",
17
- "dc:title": "The Introduction"
18
- }
19
- }
20
- }
@@ -1,14 +0,0 @@
1
- @prefix dc: <http://purl.org/dc/elements/1.1/> .
2
- @prefix ex: <http://example.org/vocab#> .
3
-
4
- <http://example.org/library> a ex:Library;
5
- ex:contains <http://example.org/library/the-republic> .
6
-
7
- <http://example.org/library/the-republic> a ex:Book;
8
- ex:contains <http://example.org/library/the-republic#introduction>;
9
- dc:creator "Plato";
10
- dc:title "The Republic" .
11
-
12
- <http://example.org/library/the-republic#introduction> a ex:Chapter;
13
- dc:description "An introductory chapter on The Republic.";
14
- dc:title "The Introduction" .
@@ -1,11 +0,0 @@
1
- {
2
- "@context": {
3
- "xsd": "http://www.w3.org/2001/XMLSchema#",
4
- "name": "http://xmlns.com/foaf/0.1/name",
5
- "age": {"@id": "http://xmlns.com/foaf/0.1/age", "@type": "xsd:integer"},
6
- "homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id"}
7
- },
8
- "name": "Manu Sporny",
9
- "age": "41",
10
- "homepage": "http://manu.sporny.org/"
11
- }
@@ -1,8 +0,0 @@
1
- {
2
- "@context": {
3
- "xsd": "http://www.w3.org/2001/XMLSchema#",
4
- "name": "http://xmlns.com/foaf/0.1/name",
5
- "age": {"@id": "http://xmlns.com/foaf/0.1/age", "@type": "xsd:integer"},
6
- "homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id"}
7
- }
8
- }
@@ -1,10 +0,0 @@
1
- [{
2
- "http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
3
- "http://xmlns.com/foaf/0.1/age": [{
4
- "@type": "http://www.w3.org/2001/XMLSchema#integer",
5
- "@value": "41"
6
- }],
7
- "http://xmlns.com/foaf/0.1/homepage": [{
8
- "@id": "http://manu.sporny.org/"
9
- }]
10
- }]
@@ -1,11 +0,0 @@
1
- {
2
- "@context": {
3
- "xsd": "http://www.w3.org/2001/XMLSchema#",
4
- "name": "http://xmlns.com/foaf/0.1/name",
5
- "age": {"@id": "http://xmlns.com/foaf/0.1/age", "@type": "xsd:integer"},
6
- "homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id"}
7
- },
8
- "name": "Manu Sporny",
9
- "age": "41",
10
- "homepage": "http://manu.sporny.org/"
11
- }
@@ -1,8 +0,0 @@
1
- @prefix age: <http://xmlns.com/foaf/0.1/age> .
2
- @prefix homepage: <http://xmlns.com/foaf/0.1/homepage> .
3
- @prefix name: <http://xmlns.com/foaf/0.1/name> .
4
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
5
-
6
- [ age: 41;
7
- homepage: <http://manu.sporny.org/>;
8
- name: "Manu Sporny"] .
@@ -1,10 +0,0 @@
1
- {
2
- "@context": {
3
- "": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@id": ":#me",
7
- "@type": "foaf:Person",
8
- "foaf:name": "Manu Sporny",
9
- "foaf:homepage": { "@id": "http://manu.sporny.org/" }
10
- }
@@ -1,7 +0,0 @@
1
- {
2
- "@context": {
3
- "": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- }
6
- }
7
-
@@ -1,6 +0,0 @@
1
- [{
2
- "@id": "http://manu.sporny.org/#me",
3
- "@type": ["http://xmlns.com/foaf/0.1/Person"],
4
- "http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
5
- "http://xmlns.com/foaf/0.1/homepage": [{ "@id": "http://manu.sporny.org/" }]
6
- }]
@@ -1,10 +0,0 @@
1
- {
2
- "@context": {
3
- "foo": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@id": "foo:#me",
7
- "@type": "foaf:Person",
8
- "foaf:name": "Manu Sporny",
9
- "foaf:homepage": { "@id": "foo:" }
10
- }
@@ -1,5 +0,0 @@
1
- @prefix foaf: <http://xmlns.com/foaf/0.1/> .
2
-
3
- <http://manu.sporny.org/#me> a foaf:Person;
4
- foaf:homepage <http://manu.sporny.org/>;
5
- foaf:name "Manu Sporny" .
@@ -1,13 +0,0 @@
1
- {
2
- "@context": {
3
- "": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@id": ":#me",
7
- "@type": "foaf:Person",
8
- "foaf:name": "Manu Sporny",
9
- "foaf:knows": {
10
- "@type": "foaf:Person",
11
- "foaf:name": "Gregg Kellogg"
12
- }
13
- }
@@ -1,7 +0,0 @@
1
- {
2
- "@context": {
3
- "": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- }
6
- }
7
-
@@ -1,9 +0,0 @@
1
- [{
2
- "@id": "http://manu.sporny.org/#me",
3
- "@type": ["http://xmlns.com/foaf/0.1/Person"],
4
- "http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
5
- "http://xmlns.com/foaf/0.1/knows": [{
6
- "@type": ["http://xmlns.com/foaf/0.1/Person"],
7
- "http://xmlns.com/foaf/0.1/name": [{"@value": "Gregg Kellogg"}]
8
- }]
9
- }]
@@ -1,13 +0,0 @@
1
- {
2
- "@context": {
3
- "foo": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@id": "foo:#me",
7
- "@type": "foaf:Person",
8
- "foaf:name": "Manu Sporny",
9
- "foaf:knows": {
10
- "@type": "foaf:Person",
11
- "foaf:name": "Gregg Kellogg"
12
- }
13
- }
@@ -1,7 +0,0 @@
1
- @prefix foaf: <http://xmlns.com/foaf/0.1/> .
2
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
3
-
4
- <http://manu.sporny.org/#me> a foaf:Person;
5
- foaf:knows [ a foaf:Person;
6
- foaf:name "Gregg Kellogg"];
7
- foaf:name "Manu Sporny" .
@@ -1,10 +0,0 @@
1
- {
2
- "@context": {
3
- "": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@id": "http://example.org/people#joebob",
7
- "@type": "foaf:Person",
8
- "foaf:name": "Joe Bob",
9
- "foaf:nick": { "@list": [ "joe", "bob", "jaybe" ] }
10
- }
@@ -1,7 +0,0 @@
1
- {
2
- "@context": {
3
- "": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- }
6
-
7
- }
@@ -1,10 +0,0 @@
1
- [{
2
- "@id": "http://example.org/people#joebob",
3
- "@type": ["http://xmlns.com/foaf/0.1/Person"],
4
- "http://xmlns.com/foaf/0.1/name": [{"@value": "Joe Bob"}],
5
- "http://xmlns.com/foaf/0.1/nick": [{ "@list": [
6
- {"@value": "joe"},
7
- {"@value": "bob"},
8
- {"@value": "jaybe"}
9
- ]}]
10
- }]
@@ -1,10 +0,0 @@
1
- {
2
- "@context": {
3
- "": "http://manu.sporny.org/",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@id": "http://example.org/people#joebob",
7
- "@type": "foaf:Person",
8
- "foaf:name": "Joe Bob",
9
- "foaf:nick": { "@list": [ "joe", "bob", "jaybe" ] }
10
- }
@@ -1,6 +0,0 @@
1
- @prefix foaf: <http://xmlns.com/foaf/0.1/> .
2
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
3
-
4
- <http://example.org/people#joebob> a foaf:Person;
5
- foaf:name "Joe Bob";
6
- foaf:nick ("joe" "bob" "jaybe") .
@@ -1,23 +0,0 @@
1
- {
2
- "@context": { "foaf": "http://xmlns.com/foaf/0.1/" },
3
- "@graph": [
4
- {
5
- "@id": "_:bnode1",
6
- "@type": "foaf:Person",
7
- "foaf:homepage": "http://example.com/bob/",
8
- "foaf:name": "Bob"
9
- },
10
- {
11
- "@id": "_:bnode2",
12
- "@type": "foaf:Person",
13
- "foaf:homepage": "http://example.com/eve/",
14
- "foaf:name": "Eve"
15
- },
16
- {
17
- "@id": "_:bnode3",
18
- "@type": "foaf:Person",
19
- "foaf:homepage": "http://example.com/manu/",
20
- "foaf:name": "Manu"
21
- }
22
- ]
23
- }
@@ -1,4 +0,0 @@
1
- {
2
- "@context": { "foaf": "http://xmlns.com/foaf/0.1/" }
3
- }
4
-
@@ -1,20 +0,0 @@
1
- [
2
- {
3
- "@id": "_:bnode1",
4
- "@type": ["http://xmlns.com/foaf/0.1/Person"],
5
- "http://xmlns.com/foaf/0.1/homepage": [{"@value": "http://example.com/bob/"}],
6
- "http://xmlns.com/foaf/0.1/name": [{"@value": "Bob"}]
7
- },
8
- {
9
- "@id": "_:bnode2",
10
- "@type": ["http://xmlns.com/foaf/0.1/Person"],
11
- "http://xmlns.com/foaf/0.1/homepage": [{"@value": "http://example.com/eve/"}],
12
- "http://xmlns.com/foaf/0.1/name": [{"@value": "Eve"}]
13
- },
14
- {
15
- "@id": "_:bnode3",
16
- "@type": ["http://xmlns.com/foaf/0.1/Person"],
17
- "http://xmlns.com/foaf/0.1/homepage": [{"@value": "http://example.com/manu/"}],
18
- "http://xmlns.com/foaf/0.1/name": [{"@value": "Manu"}]
19
- }
20
- ]
@@ -1,23 +0,0 @@
1
- {
2
- "@context": { "foaf": "http://xmlns.com/foaf/0.1/" },
3
- "@graph": [
4
- {
5
- "@id": "_:bnode1",
6
- "@type": "foaf:Person",
7
- "foaf:homepage": "http://example.com/bob/",
8
- "foaf:name": "Bob"
9
- },
10
- {
11
- "@id": "_:bnode2",
12
- "@type": "foaf:Person",
13
- "foaf:homepage": "http://example.com/eve/",
14
- "foaf:name": "Eve"
15
- },
16
- {
17
- "@id": "_:bnode3",
18
- "@type": "foaf:Person",
19
- "foaf:homepage": "http://example.com/manu/",
20
- "foaf:name": "Manu"
21
- }
22
- ]
23
- }
@@ -1,14 +0,0 @@
1
- @prefix foaf: <http://xmlns.com/foaf/0.1/> .
2
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
3
-
4
- [ a foaf:Person;
5
- foaf:homepage "http://example.com/manu/";
6
- foaf:name "Manu"] .
7
-
8
- [ a foaf:Person;
9
- foaf:homepage "http://example.com/eve/";
10
- foaf:name "Eve"] .
11
-
12
- [ a foaf:Person;
13
- foaf:homepage "http://example.com/bob/";
14
- foaf:name "Bob"] .
@@ -1,34 +0,0 @@
1
- {
2
- "@context": {
3
- "Book": "http://example.org/vocab#Book",
4
- "Chapter": "http://example.org/vocab#Chapter",
5
- "contains": {
6
- "@id": "http://example.org/vocab#contains",
7
- "@type": "@id"
8
- },
9
- "creator": "http://purl.org/dc/terms/creator",
10
- "description": "http://purl.org/dc/terms/description",
11
- "Library": "http://example.org/vocab#Library",
12
- "title": "http://purl.org/dc/terms/title"
13
- },
14
- "@graph": [
15
- {
16
- "@id": "http://example.com/library",
17
- "@type": "Library",
18
- "contains": "http://example.org/library/the-republic"
19
- },
20
- {
21
- "@id": "http://example.org/library/the-republic",
22
- "@type": "Book",
23
- "creator": "Plato",
24
- "title": "The Republic",
25
- "contains": "http://example.org/library/the-republic#introduction"
26
- },
27
- {
28
- "@id": "http://example.org/library/the-republic#introduction",
29
- "@type": "Chapter",
30
- "description": "An introductory chapter on The Republic.",
31
- "title": "The Introduction"
32
- }
33
- ]
34
- }
@@ -1,11 +0,0 @@
1
- {
2
- "@context": {
3
- "Book": "http://example.org/vocab#Book",
4
- "Chapter": "http://example.org/vocab#Chapter",
5
- "contains": {"@id": "http://example.org/vocab#contains", "@type": "@id"},
6
- "creator": "http://purl.org/dc/terms/creator",
7
- "description": "http://purl.org/dc/terms/description",
8
- "Library": "http://example.org/vocab#Library",
9
- "title": "http://purl.org/dc/terms/title"
10
- }
11
- }
@@ -1,24 +0,0 @@
1
- [
2
- {
3
- "@id": "http://example.com/library",
4
- "@type": ["http://example.org/vocab#Library"],
5
- "http://example.org/vocab#contains": [{
6
- "@id": "http://example.org/library/the-republic"
7
- }]
8
- },
9
- {
10
- "@id": "http://example.org/library/the-republic",
11
- "@type": ["http://example.org/vocab#Book"],
12
- "http://purl.org/dc/terms/creator": [{"@value": "Plato"}],
13
- "http://purl.org/dc/terms/title": [{"@value": "The Republic"}],
14
- "http://example.org/vocab#contains": [{
15
- "@id": "http://example.org/library/the-republic#introduction"
16
- }]
17
- },
18
- {
19
- "@id": "http://example.org/library/the-republic#introduction",
20
- "@type": ["http://example.org/vocab#Chapter"],
21
- "http://purl.org/dc/terms/description": [{"@value": "An introductory chapter on The Republic."}],
22
- "http://purl.org/dc/terms/title": [{"@value": "The Introduction"}]
23
- }
24
- ]
@@ -1,18 +0,0 @@
1
- {
2
- "@context": {
3
- "Book": "http://example.org/vocab#Book",
4
- "Chapter": "http://example.org/vocab#Chapter",
5
- "contains": "http://example.org/vocab#contains",
6
- "creator": "http://purl.org/dc/terms/creator",
7
- "description": "http://purl.org/dc/terms/description",
8
- "Library": "http://example.org/vocab#Library",
9
- "title": "http://purl.org/dc/terms/title"
10
- },
11
- "@type": "Library",
12
- "contains": {
13
- "@type": "Book",
14
- "contains": {
15
- "@type": "Chapter"
16
- }
17
- }
18
- }
@@ -1,25 +0,0 @@
1
- {
2
- "@context": {
3
- "Book": "http://example.org/vocab#Book",
4
- "Chapter": "http://example.org/vocab#Chapter",
5
- "contains": "http://example.org/vocab#contains",
6
- "creator": "http://purl.org/dc/terms/creator",
7
- "description": "http://purl.org/dc/terms/description",
8
- "Library": "http://example.org/vocab#Library",
9
- "title": "http://purl.org/dc/terms/title"
10
- },
11
- "@id": "http://example.com/library",
12
- "@type": "Library",
13
- "contains": {
14
- "@id": "http://example.org/library/the-republic",
15
- "@type": "Book",
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
- },
22
- "creator": "Plato",
23
- "title": "The Republic"
24
- }
25
- }
@@ -1,30 +0,0 @@
1
- {
2
- "@context": {
3
- "Book": "http://example.org/vocab#Book",
4
- "Chapter": "http://example.org/vocab#Chapter",
5
- "contains": {"@id": "http://example.org/vocab#contains", "@type": "@id"},
6
- "creator": "http://purl.org/dc/terms/creator",
7
- "description": "http://purl.org/dc/terms/description",
8
- "Library": "http://example.org/vocab#Library",
9
- "title": "http://purl.org/dc/terms/title"
10
- },
11
- "@graph":
12
- [{
13
- "@id": "http://example.com/library",
14
- "@type": "Library",
15
- "contains": "http://example.org/library/the-republic"
16
- },
17
- {
18
- "@id": "http://example.org/library/the-republic",
19
- "@type": "Book",
20
- "creator": "Plato",
21
- "title": "The Republic",
22
- "contains": "http://example.org/library/the-republic#introduction"
23
- },
24
- {
25
- "@id": "http://example.org/library/the-republic#introduction",
26
- "@type": "Chapter",
27
- "description": "An introductory chapter on The Republic.",
28
- "title": "The Introduction"
29
- }]
30
- }
@@ -1,15 +0,0 @@
1
- @prefix dc: <http://purl.org/dc/terms/> .
2
- @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3
-
4
- <http://example.com/library> a <http://example.org/vocab#Library>;
5
- <http://example.org/vocab#contains> <http://example.org/library/the-republic> .
6
-
7
- <http://example.org/library/the-republic> a <http://example.org/vocab#Book>;
8
- dc:title "The Republic";
9
- <http://example.org/vocab#contains> <http://example.org/library/the-republic#introduction>;
10
- dc:creator "Plato" .
11
-
12
- <http://example.org/library/the-republic#introduction> a <http://example.org/vocab#Chapter>;
13
- dc:title "The Introduction";
14
- dc:description "An introductory chapter on The Republic." .
15
-
@@ -1,20 +0,0 @@
1
- {
2
- "@context": {
3
- "id1": "http://example.com/id1",
4
- "t1": "http://example.com/t1",
5
- "t2": "http://example.com/t2",
6
- "term1": "http://example.com/term",
7
- "term2": {"@id": "http://example.com/term", "@type": "t2"},
8
- "term3": {"@id": "http://example.com/term", "@language": "en"},
9
- "term4": {"@id": "http://example.com/term", "@container": "@list"},
10
- "term5": {"@id": "http://example.com/term", "@language": null},
11
- "@language": "de"
12
- },
13
- "@id": "http://example.com/id1",
14
- "@type": "t1",
15
- "term1": "v1",
16
- "term2": "v2",
17
- "term3": "v3",
18
- "term4": [ 1, 2 ],
19
- "term5": [ "v5", "plain literal" ]
20
- }
@@ -1,13 +0,0 @@
1
- {
2
- "@context": {
3
- "id1": "http://example.com/id1",
4
- "t1": "http://example.com/t1",
5
- "t2": "http://example.com/t2",
6
- "term1": "http://example.com/term",
7
- "term2": {"@id": "http://example.com/term", "@type": "t2"},
8
- "term3": {"@id": "http://example.com/term", "@language": "en"},
9
- "term4": {"@id": "http://example.com/term", "@container": "@list"},
10
- "term5": {"@id": "http://example.com/term", "@language": null},
11
- "@language": "de"
12
- }
13
- }
@@ -1,14 +0,0 @@
1
- [
2
- {
3
- "@id": "http://example.com/id1",
4
- "@type": ["http://example.com/t1"],
5
- "http://example.com/term": [
6
- {"@value": "v1","@language": "de"},
7
- {"@value": "v2","@type": "http://example.com/t2"},
8
- {"@value": "v3","@language": "en"},
9
- {"@list": [{"@value": 1},{"@value": 2}]},
10
- {"@value": "v5"},
11
- {"@value": "plain literal"}
12
- ]
13
- }
14
- ]
@@ -1,12 +0,0 @@
1
- [{
2
- "@id": "http://example.com/id1",
3
- "@type": ["http://example.com/t1"],
4
- "http://example.com/term": [
5
- {"@value": "v1", "@language": "de"},
6
- {"@value": "v2", "@type": "http://example.com/t2"},
7
- {"@value": "v3", "@language": "en"},
8
- {"@list": [1, 2]},
9
- {"@value": "v5"},
10
- {"@value": "plain literal"}
11
- ]
12
- }]