|
1106 | 1106 | }] |
1107 | 1107 | }) |
1108 | 1108 | }, |
1109 | | - "Preserve graphs if outer @graph is used" => { |
| 1109 | + "Frame default graph if outer @graph is used" => { |
1110 | 1110 | frame: %({ |
1111 | 1111 | "@context": {"@vocab": "urn:"}, |
1112 | 1112 | "@type": "Class", |
|
1239 | 1239 | }, |
1240 | 1240 | "library" => { |
1241 | 1241 | frame: %({ |
1242 | | - "@context": { |
1243 | | - "dc": "http://purl.org/dc/elements/1.1/", |
1244 | | - "ex": "http://example.org/vocab#", |
1245 | | - "xsd": "http://www.w3.org/2001/XMLSchema#", |
1246 | | - "ex:contains": { "@type": "@id" } |
1247 | | - }, |
1248 | | - "@type": "ex:Library", |
1249 | | - "ex:contains": { |
| 1242 | + "@context": {"@vocab": "http://example.org/"}, |
| 1243 | + "@type": "Library", |
| 1244 | + "contains": { |
1250 | 1245 | "@id": "http://example.org/graphs/books", |
1251 | | - "@graph": { |
1252 | | - "@type": "ex:Book" |
1253 | | - } |
| 1246 | + "@graph": {"@type": "Book"} |
1254 | 1247 | } |
1255 | 1248 | }), |
1256 | 1249 | input: %({ |
1257 | | - "@context": { |
1258 | | - "dc": "http://purl.org/dc/elements/1.1/", |
1259 | | - "ex": "http://example.org/vocab#", |
1260 | | - "xsd": "http://www.w3.org/2001/XMLSchema#", |
1261 | | - "ex:contains": { "@type": "@id" } |
1262 | | - }, |
| 1250 | + "@context": {"@vocab": "http://example.org/"}, |
1263 | 1251 | "@id": "http://example.org/library", |
1264 | | - "@type": "ex:Library", |
1265 | | - "dc:name": "Library", |
1266 | | - "ex:contains": { |
| 1252 | + "@type": "Library", |
| 1253 | + "name": "Library", |
| 1254 | + "contains": { |
1267 | 1255 | "@id": "http://example.org/graphs/books", |
1268 | 1256 | "@graph": { |
1269 | 1257 | "@id": "http://example.org/library/the-republic", |
1270 | | - "@type": "ex:Book", |
1271 | | - "dc:creator": "Plato", |
1272 | | - "dc:title": "The Republic", |
1273 | | - "ex:contains": { |
| 1258 | + "@type": "Book", |
| 1259 | + "creator": "Plato", |
| 1260 | + "title": "The Republic", |
| 1261 | + "contains": { |
1274 | 1262 | "@id": "http://example.org/library/the-republic#introduction", |
1275 | | - "@type": "ex:Chapter", |
1276 | | - "dc:description": "An introductory chapter on The Republic.", |
1277 | | - "dc:title": "The Introduction" |
| 1263 | + "@type": "Chapter", |
| 1264 | + "description": "An introductory chapter on The Republic.", |
| 1265 | + "title": "The Introduction" |
1278 | 1266 | } |
1279 | 1267 | } |
1280 | 1268 | } |
1281 | 1269 | }), |
1282 | 1270 | output: %({ |
1283 | | - "@context": { |
1284 | | - "dc": "http://purl.org/dc/elements/1.1/", |
1285 | | - "ex": "http://example.org/vocab#", |
1286 | | - "xsd": "http://www.w3.org/2001/XMLSchema#", |
1287 | | - "ex:contains": { "@type": "@id" } |
1288 | | - }, |
| 1271 | + "@context": {"@vocab": "http://example.org/"}, |
1289 | 1272 | "@graph": [ |
1290 | 1273 | { |
1291 | 1274 | "@id": "http://example.org/library", |
1292 | | - "@type": "ex:Library", |
1293 | | - "dc:name": "Library", |
1294 | | - "ex:contains": { |
| 1275 | + "@type": "Library", |
| 1276 | + "name": "Library", |
| 1277 | + "contains": { |
1295 | 1278 | "@id": "http://example.org/graphs/books", |
1296 | 1279 | "@graph": [ |
1297 | 1280 | { |
1298 | 1281 | "@id": "http://example.org/library/the-republic", |
1299 | | - "@type": "ex:Book", |
1300 | | - "dc:creator": "Plato", |
1301 | | - "dc:title": "The Republic", |
1302 | | - "ex:contains": { |
| 1282 | + "@type": "Book", |
| 1283 | + "creator": "Plato", |
| 1284 | + "title": "The Republic", |
| 1285 | + "contains": { |
1303 | 1286 | "@id": "http://example.org/library/the-republic#introduction", |
1304 | | - "@type": "ex:Chapter", |
1305 | | - "dc:description": "An introductory chapter on The Republic.", |
1306 | | - "dc:title": "The Introduction" |
| 1287 | + "@type": "Chapter", |
| 1288 | + "description": "An introductory chapter on The Republic.", |
| 1289 | + "title": "The Introduction" |
1307 | 1290 | } |
1308 | 1291 | } |
1309 | 1292 | ] |
|
0 commit comments