|
652 | 652 | "query": {"@id": "mq:query", "@type": "@id"}, |
653 | 653 | "result": {"@id": "mf:result", "@type": "xsd:boolean"} |
654 | 654 | }, |
655 | | - "@graph": [{ |
656 | | - "@type": "mf:Manifest", |
657 | | - "comment": "Positive processor tests", |
658 | | - "entries": [{ |
659 | | - "@type": "mf:ManifestEntry", |
660 | | - "action": { |
661 | | - "@type": "mq:QueryTest", |
662 | | - "data": "http://www.w3.org/TR/microdata-rdf/tests/0001.html", |
663 | | - "query": "http://www.w3.org/TR/microdata-rdf/tests/0001.ttl" |
664 | | - }, |
665 | | - "comment": "Item with no itemtype and literal itemprop", |
666 | | - "mf:result": "true", |
667 | | - "name": "Test 0001" |
668 | | - }] |
| 655 | + "@type": "mf:Manifest", |
| 656 | + "comment": "Positive processor tests", |
| 657 | + "entries": [{ |
| 658 | + "@type": "mf:ManifestEntry", |
| 659 | + "action": { |
| 660 | + "@type": "mq:QueryTest", |
| 661 | + "data": "http://www.w3.org/TR/microdata-rdf/tests/0001.html", |
| 662 | + "query": "http://www.w3.org/TR/microdata-rdf/tests/0001.ttl" |
| 663 | + }, |
| 664 | + "comment": "Item with no itemtype and literal itemprop", |
| 665 | + "mf:result": "true", |
| 666 | + "name": "Test 0001" |
669 | 667 | }] |
670 | 668 | }), |
671 | 669 | processingMode: 'json-ld-1.1' |
|
1129 | 1127 | }), |
1130 | 1128 | output: %({ |
1131 | 1129 | "@context": {"@vocab": "urn:"}, |
1132 | | - "@graph": [{ |
1133 | | - "@id": "urn:id-1", |
1134 | | - "@type": "Class", |
1135 | | - "preserve": {} |
1136 | | - }] |
| 1130 | + "@id": "urn:id-1", |
| 1131 | + "@type": "Class", |
| 1132 | + "preserve": {} |
1137 | 1133 | }), |
1138 | 1134 | processingMode: 'json-ld-1.1' |
1139 | 1135 | }, |
|
1157 | 1153 | }), |
1158 | 1154 | output: %({ |
1159 | 1155 | "@context": {"@vocab": "urn:"}, |
1160 | | - "@graph": [{ |
1161 | | - "@id": "urn:id-1", |
1162 | | - "@type": "Class", |
1163 | | - "preserve": { |
1164 | | - "@id": "urn:gr-1", |
1165 | | - "@graph": { |
1166 | | - "@id": "urn:id-2", |
1167 | | - "term": "data" |
1168 | | - } |
| 1156 | + "@id": "urn:id-1", |
| 1157 | + "@type": "Class", |
| 1158 | + "preserve": { |
| 1159 | + "@id": "urn:gr-1", |
| 1160 | + "@graph": { |
| 1161 | + "@id": "urn:id-2", |
| 1162 | + "term": "data" |
1169 | 1163 | } |
1170 | | - }] |
| 1164 | + } |
1171 | 1165 | }), |
1172 | 1166 | processingMode: 'json-ld-1.1' |
1173 | 1167 | }, |
|
1200 | 1194 | }), |
1201 | 1195 | output: %({ |
1202 | 1196 | "@context": {"@vocab": "urn:"}, |
1203 | | - "@graph": [{ |
1204 | | - "@id": "urn:id-1", |
1205 | | - "@type": "Class", |
1206 | | - "merge": { |
1207 | | - "@id": "urn:id-2", |
1208 | | - "term": "foo" |
1209 | | - }, |
1210 | | - "preserve": { |
1211 | | - "@id": "urn:graph-1", |
1212 | | - "@graph": { |
1213 | | - "@id": "urn:id-3", |
1214 | | - "term": "bar" |
1215 | | - } |
| 1197 | + "@id": "urn:id-1", |
| 1198 | + "@type": "Class", |
| 1199 | + "merge": { |
| 1200 | + "@id": "urn:id-2", |
| 1201 | + "term": "foo" |
| 1202 | + }, |
| 1203 | + "preserve": { |
| 1204 | + "@id": "urn:graph-1", |
| 1205 | + "@graph": { |
| 1206 | + "@id": "urn:id-3", |
| 1207 | + "term": "bar" |
1216 | 1208 | } |
1217 | | - }] |
| 1209 | + } |
1218 | 1210 | }), |
1219 | 1211 | processingMode: 'json-ld-1.1' |
1220 | 1212 | }, |
|
1250 | 1242 | }), |
1251 | 1243 | output: %({ |
1252 | 1244 | "@context": {"@vocab": "urn:"}, |
1253 | | - "@graph": [{ |
1254 | | - "@id": "urn:id-1", |
1255 | | - "@type": "Class", |
1256 | | - "merge": { |
1257 | | - "@id": "urn:id-2", |
1258 | | - "term": "foo" |
1259 | | - }, |
1260 | | - "preserve": { |
1261 | | - "deep": { |
1262 | | - "@graph": { |
1263 | | - "@id": "urn:id-3", |
1264 | | - "term": "bar" |
1265 | | - } |
| 1245 | + "@id": "urn:id-1", |
| 1246 | + "@type": "Class", |
| 1247 | + "merge": { |
| 1248 | + "@id": "urn:id-2", |
| 1249 | + "term": "foo" |
| 1250 | + }, |
| 1251 | + "preserve": { |
| 1252 | + "deep": { |
| 1253 | + "@graph": { |
| 1254 | + "@id": "urn:id-3", |
| 1255 | + "term": "bar" |
1266 | 1256 | } |
1267 | 1257 | } |
1268 | | - }] |
| 1258 | + } |
1269 | 1259 | }), |
1270 | 1260 | processingMode: 'json-ld-1.1' |
1271 | 1261 | }, |
|
1301 | 1291 | }), |
1302 | 1292 | output: %({ |
1303 | 1293 | "@context": {"@vocab": "http://example.org/"}, |
1304 | | - "@graph": [ |
1305 | | - { |
1306 | | - "@id": "http://example.org/library", |
1307 | | - "@type": "Library", |
1308 | | - "name": "Library", |
| 1294 | + "@id": "http://example.org/library", |
| 1295 | + "@type": "Library", |
| 1296 | + "name": "Library", |
| 1297 | + "contains": { |
| 1298 | + "@id": "http://example.org/graphs/books", |
| 1299 | + "@graph": { |
| 1300 | + "@id": "http://example.org/library/the-republic", |
| 1301 | + "@type": "Book", |
| 1302 | + "creator": "Plato", |
| 1303 | + "title": "The Republic", |
1309 | 1304 | "contains": { |
1310 | | - "@id": "http://example.org/graphs/books", |
1311 | | - "@graph": { |
1312 | | - "@id": "http://example.org/library/the-republic", |
1313 | | - "@type": "Book", |
1314 | | - "creator": "Plato", |
1315 | | - "title": "The Republic", |
1316 | | - "contains": { |
1317 | | - "@id": "http://example.org/library/the-republic#introduction", |
1318 | | - "@type": "Chapter", |
1319 | | - "description": "An introductory chapter on The Republic.", |
1320 | | - "title": "The Introduction" |
1321 | | - } |
1322 | | - } |
| 1305 | + "@id": "http://example.org/library/the-republic#introduction", |
| 1306 | + "@type": "Chapter", |
| 1307 | + "description": "An introductory chapter on The Republic.", |
| 1308 | + "title": "The Introduction" |
1323 | 1309 | } |
1324 | 1310 | } |
1325 | | - ] |
| 1311 | + } |
1326 | 1312 | }), |
1327 | 1313 | processingMode: 'json-ld-1.1' |
1328 | 1314 | } |
|
1523 | 1509 | }, |
1524 | 1510 | "id": "@id" |
1525 | 1511 | }, |
1526 | | - "@graph": [ |
1527 | | - { |
1528 | | - "claim": { |
1529 | | - "id": "ex:1", |
1530 | | - "test": "foo" |
1531 | | - } |
1532 | | - } |
1533 | | - ] |
| 1512 | + "claim": { |
| 1513 | + "id": "ex:1", |
| 1514 | + "test": "foo" |
| 1515 | + } |
1534 | 1516 | }) |
1535 | 1517 | do_frame(input: input, frame: frame, output: expected, processingMode: 'json-ld-1.1') |
1536 | 1518 | end |
|
0 commit comments