json-ld 3.2.4 → 3.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/json/ld/api.rb +807 -771
  4. data/lib/json/ld/compact.rb +304 -304
  5. data/lib/json/ld/conneg.rb +179 -161
  6. data/lib/json/ld/context.rb +2080 -1913
  7. data/lib/json/ld/expand.rb +745 -666
  8. data/lib/json/ld/extensions.rb +14 -13
  9. data/lib/json/ld/flatten.rb +257 -247
  10. data/lib/json/ld/format.rb +202 -194
  11. data/lib/json/ld/frame.rb +525 -502
  12. data/lib/json/ld/from_rdf.rb +223 -204
  13. data/lib/json/ld/html/nokogiri.rb +123 -121
  14. data/lib/json/ld/html/rexml.rb +151 -147
  15. data/lib/json/ld/reader.rb +107 -100
  16. data/lib/json/ld/resource.rb +224 -205
  17. data/lib/json/ld/streaming_reader.rb +574 -507
  18. data/lib/json/ld/streaming_writer.rb +93 -92
  19. data/lib/json/ld/to_rdf.rb +171 -169
  20. data/lib/json/ld/utils.rb +270 -264
  21. data/lib/json/ld/version.rb +24 -14
  22. data/lib/json/ld/writer.rb +334 -311
  23. data/lib/json/ld.rb +103 -96
  24. metadata +55 -198
  25. data/spec/api_spec.rb +0 -132
  26. data/spec/compact_spec.rb +0 -3482
  27. data/spec/conneg_spec.rb +0 -373
  28. data/spec/context_spec.rb +0 -2056
  29. data/spec/expand_spec.rb +0 -4496
  30. data/spec/flatten_spec.rb +0 -1203
  31. data/spec/format_spec.rb +0 -115
  32. data/spec/frame_spec.rb +0 -2541
  33. data/spec/from_rdf_spec.rb +0 -1072
  34. data/spec/matchers.rb +0 -20
  35. data/spec/rdfstar_spec.rb +0 -25
  36. data/spec/reader_spec.rb +0 -883
  37. data/spec/resource_spec.rb +0 -76
  38. data/spec/spec_helper.rb +0 -281
  39. data/spec/streaming_reader_spec.rb +0 -237
  40. data/spec/streaming_writer_spec.rb +0 -145
  41. data/spec/suite_compact_spec.rb +0 -22
  42. data/spec/suite_expand_spec.rb +0 -36
  43. data/spec/suite_flatten_spec.rb +0 -34
  44. data/spec/suite_frame_spec.rb +0 -29
  45. data/spec/suite_from_rdf_spec.rb +0 -22
  46. data/spec/suite_helper.rb +0 -411
  47. data/spec/suite_html_spec.rb +0 -22
  48. data/spec/suite_http_spec.rb +0 -35
  49. data/spec/suite_remote_doc_spec.rb +0 -22
  50. data/spec/suite_to_rdf_spec.rb +0 -30
  51. data/spec/support/extensions.rb +0 -44
  52. data/spec/test-files/test-1-compacted.jsonld +0 -10
  53. data/spec/test-files/test-1-context.jsonld +0 -7
  54. data/spec/test-files/test-1-expanded.jsonld +0 -5
  55. data/spec/test-files/test-1-input.jsonld +0 -10
  56. data/spec/test-files/test-1-rdf.ttl +0 -8
  57. data/spec/test-files/test-2-compacted.jsonld +0 -20
  58. data/spec/test-files/test-2-context.jsonld +0 -7
  59. data/spec/test-files/test-2-expanded.jsonld +0 -16
  60. data/spec/test-files/test-2-input.jsonld +0 -20
  61. data/spec/test-files/test-2-rdf.ttl +0 -14
  62. data/spec/test-files/test-3-compacted.jsonld +0 -11
  63. data/spec/test-files/test-3-context.jsonld +0 -8
  64. data/spec/test-files/test-3-expanded.jsonld +0 -10
  65. data/spec/test-files/test-3-input.jsonld +0 -11
  66. data/spec/test-files/test-3-rdf.ttl +0 -8
  67. data/spec/test-files/test-4-compacted.jsonld +0 -10
  68. data/spec/test-files/test-4-context.jsonld +0 -7
  69. data/spec/test-files/test-4-expanded.jsonld +0 -6
  70. data/spec/test-files/test-4-input.jsonld +0 -10
  71. data/spec/test-files/test-4-rdf.ttl +0 -5
  72. data/spec/test-files/test-5-compacted.jsonld +0 -13
  73. data/spec/test-files/test-5-context.jsonld +0 -7
  74. data/spec/test-files/test-5-expanded.jsonld +0 -9
  75. data/spec/test-files/test-5-input.jsonld +0 -13
  76. data/spec/test-files/test-5-rdf.ttl +0 -7
  77. data/spec/test-files/test-6-compacted.jsonld +0 -10
  78. data/spec/test-files/test-6-context.jsonld +0 -7
  79. data/spec/test-files/test-6-expanded.jsonld +0 -10
  80. data/spec/test-files/test-6-input.jsonld +0 -10
  81. data/spec/test-files/test-6-rdf.ttl +0 -6
  82. data/spec/test-files/test-7-compacted.jsonld +0 -23
  83. data/spec/test-files/test-7-context.jsonld +0 -4
  84. data/spec/test-files/test-7-expanded.jsonld +0 -20
  85. data/spec/test-files/test-7-input.jsonld +0 -23
  86. data/spec/test-files/test-7-rdf.ttl +0 -14
  87. data/spec/test-files/test-8-compacted.jsonld +0 -34
  88. data/spec/test-files/test-8-context.jsonld +0 -11
  89. data/spec/test-files/test-8-expanded.jsonld +0 -24
  90. data/spec/test-files/test-8-frame.jsonld +0 -18
  91. data/spec/test-files/test-8-framed.jsonld +0 -25
  92. data/spec/test-files/test-8-input.jsonld +0 -30
  93. data/spec/test-files/test-8-rdf.ttl +0 -15
  94. data/spec/test-files/test-9-compacted.jsonld +0 -20
  95. data/spec/test-files/test-9-context.jsonld +0 -13
  96. data/spec/test-files/test-9-expanded.jsonld +0 -14
  97. data/spec/test-files/test-9-input.jsonld +0 -12
  98. data/spec/to_rdf_spec.rb +0 -1684
  99. 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
- }]